//Script controlls spawning creatures in Area A State Base { Conditions { } Actions { //SetState SpawnGroupA SetState Update } } State Update { Conditions { if NumInSetAlive "1" < 4 and if EitherPlayerInTriggerArea "Spawn_A" == 1 goto SpawnWait } Actions { } } State SpawnWait { Conditions { } Actions { Idle "mintime=0" "maxtime=10" SetState SpawnGroupA } } State SpawnGroupA { Conditions { if Random < 0.8 goto ZipDown if AlwaysTrue == 1 goto OffScreen } Actions { } } State SpawnTmpWait { Conditions { if PSP == 0 and if NumInSetAlive "1" < 12 goto SpawnGroupA if PSP == 1 and if NumInSetAlive "1" < 6 goto SpawnGroupA if AlwaysTrue == 1 goto Update } Actions { } } State ZipDown { Conditions { } Actions { CreateCreatures "locator_group=spawna" "type=StormTrooper" "type=ImperialOfficer" "type=BeachTrooper" "type=ImperialShuttlePilot" "script=Attack" "addtoset=1" "yoffset=6" "dont_set_on_surface" "zipdown" ;Give a frame or 2 to stagger it Idle "0.1" SetState SpawnTmpWait } } State OffScreen { Conditions { } Actions { CreateCreatures "locator_group=spawnaOff" "type=StormTrooper" "type=ImperialOfficer" "type=BeachTrooper" "type=GamorreanGuard" "type=SkiffGuard" "type=ImperialGuard" "script=Attack" "addtoset=1" "offscreen" ;Give a frame or 2 to stagger it Idle "0.1" SetState SpawnTmpWait } }