//JabbasPalace_e: This controls the spawning of gamorrean guards from tube 4 state Base { Conditions { if ObstacleAtStart "r2d2_cover" == 0 goto StartSpawn } Actions { } } state StartSpawn { Conditions { if NumInSetAlive "1" < 5 goto Spawn if AlwaysTrue == 1 goto EndSpawn } Actions { } } state Spawn { Conditions { } Actions { CreateCreatures "locator=spawn_2" "type=GamorreanGuard" "script=ai_Guard" "AddToSet=1" AlertCreatures "character=player" SetState "EndSpawn" } } state EndSpawn { Conditions { if ObstacleAtStart "r2d2_cover" == 1 goto Base } Actions { Idle "3" CloseDoor "r2d2_cover" LockDoor "r2d2_cover" } }