//HothEscape_a //Spawns baddies when player jumps onto turret. state Base { Conditions { if MissionMode == 1 goto MissionMode if UnderPlayerControl "troopercannon_1" == 1 goto UpdateSpawning } Actions { AddLocatorGroup "name=CannonSpawn" } } state UpdateSpawning { Conditions { if UnderPlayerControl "troopercannon_1" == 0 goto Base if Timer > 0 and if Message "NumSpawnedA" < 20 and if NumInSetAlive "1" < 3 goto Spawn } Actions { } } state Spawn { Conditions { } Actions { CreateCreatures "locator_group=CannonSpawn" "type=SnowTrooper" "script=SpawnAttack" "addtoset=1" "off_screen" SetMessage "name=NumSpawnedA" "increment=1" ResetTimer "mintime=-2" "maxtime=-0.5" SetState "UpdateSpawning" } } state MissionMode { Conditions { } Actions { } }