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

useBehaviourClaim

useBehaviourClaim(behaviour): boolean

Returns whether the nearest Entity accepted behaviour, as useBehaviour does, for a component that writes the behaviour’s trait through verbs rather than from a value, such as <Inventory>. It claims the behaviour on the entity, so a second of it is refused the same way, but it never adds, sets or removes the trait: the component does, only while accepted, and undoes what it did as it unmounts. A claim is the entity’s record of which component holds a trait, and it lasts while that component is mounted.

Parameter Type
behaviour Behaviour

boolean