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

isTarget

isTarget(world, entity, candidate, isTargetOptions?): boolean

Whether candidate is among the targets targets names for the behaviour on entity: let in by one of its kinds or layers, the default kind where it lists none, and kept by each of its teams and rules. A behaviour adds its own conditions on top, such as a chaser never running at an ally.

Parameter Type
world World
entity Entity
candidate Entity
isTargetOptions IsTargetOptions

boolean

if (isTarget(step.world, gate, character, { targets: [red] })) open(gate);