Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

PredictedTrait

A trait her page predicts on her character, as defineTrait(name, schema, { predicted: true }) makes it. Koota’s own functions refuse it, so a monster never holds it and no system writes it by accident. Write it on the PredictedEntity a predicted step hands out, from step.updateEachPredicted, a predicted command’s command.entity or onCharacterSpawn, or from the room with grantPredicted. Read it anywhere with readTrait, the engine’s useTrait, or readEach over the engine’s createQuery.

Type Parameter Default type
S extends Schema any

PredictedTrait(value?): PredictedTuple<S>

The trait with its first value, to add to a character: character.add(DashTrait({ charges: 1 })).

Parameter Type
value? TraitValue<S>

PredictedTuple<S>

Property Modifier Type
[predictedBrand] readonly (schema) => S