//JabbasPalace_a: This script controls the respawning of creatures down the tubes the 1st corridor state Base { Conditions { if EitherPlayerInTriggerArea "Spawn_1" == 1 and if PartyUnderCover == 0 and if NumInSetAlive "1" < 2 goto GetReadyToSpawn1 if ObstacleAtStart "lid_cover_05" == 1 and if EitherPlayerInTriggerArea "Spawn_3" == 1 and if PartyUnderCover == 0 and if NumInSetAlive "1" < 2 goto GetReadyToSpawn2 } Actions { ResetTimer } } //////// 1st pair of tubes state GetReadyToSpawn1 { Conditions { if Timer > 5 goto Spawn1 } Actions { } } state Spawn1 { Conditions { if ObstacleAtStart "lid_cover_01" == 1 and if ObstacleAtStart "lid_cover_02" == 1 goto SpawnRandom1 if ObstacleAtStart "lid_cover_01" == 1 goto Spawn1_A if ObstacleAtStart "lid_cover_02" == 1 goto Spawn1_B if AlwaysTrue == 1 goto Base } Actions { } } state SpawnRandom1 { Conditions { if Random < 0.5 goto Spawn1_A if AlwaysTrue == 1 goto Spawn1_B } Actions { } } state Spawn1_A { Conditions { } Actions { CreateCreatures "locator=spawn_1" "type=GamorreanGuard" "script=GamorreanGuard" "addtoset=1" AlertCreatures "character=player" SetState "Base" } } state Spawn1_B { Conditions { } Actions { CreateCreatures "locator=spawn_2" "type=GamorreanGuard" "script=GamorreanGuard" "addtoset=1" AlertCreatures "character=player" SetState "Base" } } /////// tube in helmet room state GetReadyToSpawn2 { Conditions { if ObstacleAtStart "lid_cover_05" == 0 goto Base if Timer > 5 goto Spawn2 } Actions { } } state Spawn2 { Conditions { } Actions { CreateCreatures "locator=spawn_5" "type=GamorreanGuard" "script=GamorreanGuard" "addtoset=1" AlertCreatures "character=player" SetState "Base" } }