objSpawnCondition

objects / Level Objects / objSpawnCondition
This object has no parent.

Description

Variables

NameValueDescription
despawnType0

if 0 beenOutsideView will be false if the object is not allowed to spawn

if 1 beenOutiseView will be true if the object is not allowed to spawn

faction-1

if different from -1 it will only affect entities with that faction

otherwise everything but players and player projectiles would be affected

playerXDistance80

spawn if the player is closer than this distance on x. -1: doesn't matter. Measured from center.

playerYDistance-1

spawn if the player is closer than this distance on y. -1: doesn't matter. Measured from center.

conditionCode""

if this is non-empty, the above check will not take place and instead this

code will be string_execute'd. It must set the local variable allowSpawn.

conditionScriptscrNoEffect

if this script is set in creation code, all above conditions will be ignored

and this script will run. The script should set allowSpawn.

conditionScriptArgC0

number of arguments

conditionScriptArgVmakeArray(0)

array containing arguments (will be cropped to `conditionScriptArgC`)

spawnConditionNegatefalse

negate the spawn condition?

allowSpawntrue

currently allowing spawn? (not for creation code)

variable names in bold are safe to set in creation code.