getAwakeningZone

getAwakeningZone

> Functions

Returns the radius of the awakening zone of the entity entity, in cells.

A plant with a zone does not play a turn: it wakes up when an entity walks into its zone, and that is when its AI runs. The function returns 0 for any entity that plays its turn normally, including a rooted plant without an awakening zone.

Neither getType nor getEntityTurnOrder answers this question: the ENTITY_PLANT type does not say whether the plant has a zone, and a plant with a zone keeps its place in the turn order — only its AI is never run there. The zone is a circle measured in cells, like getCellDistance, and every cell walked on counts: crossing the zone wakes the plant, even without stopping.

Example:

Parameters
Return