//Script controlls spawning creatures in Area A State Base { Conditions { } Actions { SetState SpawnGroupA } } State Update { Conditions { if NumInSetAlive "1" < 5 and if EitherPlayerInTriggerArea "Spawn_Area_A" == 1 goto SpawnWait } Actions { } } State SpawnWait { Conditions { if EitherPlayerInTriggerArea "Spawn_Area_A" == 0 goto SpawnGroupA } Actions { Idle "mintime=4" "maxtime=10" SetState SpawnGroupA } } State SpawnGroupA { Conditions { if NumInSetAlive "1" < 10 and if EitherPlayerInTriggerArea "Spawn_Area_A" == 1 goto SpawnGroupA if AlwaysTrue == 1 goto Update } Actions { CreateCreatures "locator_group=spawna" "type=StormTrooper" "type=ImperialOfficer" "type=BeachTrooper" "type=ImperialShuttlePilot" "script=Attack" "addtoset=1" "nearest_player" "off_screen" } }