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

isAlly

isAlly(world, first, second): boolean

Whether first and second fight on one side: what damage, weapons, chase and abilities read. One entity is its own ally. With a rule, both need a team and the rule’s isTeamAlly must say so for the two, which by default means one team, so two entities with no team are allies of nobody. With no rule, every entity with a player behind it is an ally of every other, so players’ shots pass through each other and an NPC is an ally of nobody. first may be an instigator, judged by the team it acted for.

Parameter Type
world World
first Entity | Instigator
second Entity

boolean