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