//JabbasPalace_d state Base { Conditions { if EitherPlayerInTriggerArea "SpawnTubes" == 1 and if PartyUnderCover == 0 and if NumInSetAlive "2" < 2 goto GetReadyToSpawn } Actions { ResetTimer } } state GetReadyToSpawn { Conditions { if Timer > 5 goto Spawn } Actions { } } state Spawn { Conditions { if ObstacleAtStart "lid_cover_03" == 1 and if ObstacleAtStart "lid_cover_04" == 1 goto SpawnRandom if ObstacleAtStart "lid_cover_03" == 1 goto Spawn_3 if ObstacleAtStart "lid_cover_04" == 1 goto Spawn_4 if AlwaysTrue == 1 goto Base } Actions { } } state SpawnRandom { Conditions { if Random < 0.5 goto Spawn_3 if AlwaysTrue == 1 goto Spawn_4 } Actions { } } state Spawn_3 { Conditions { } Actions { CreateCreatures "locator=SpawnTube_3" "type=GamorreanGuard" "script=GamorreanGuard" "addtoset=2" AlertCreatures "character=player" SetState "Base" } } state Spawn_4 { Conditions { } Actions { CreateCreatures "locator=SpawnTube_4" "type=GamorreanGuard" "script=GamorreanGuard" "addtoset=2" AlertCreatures "character=player" SetState "Base" } }