//CloudCityEscape_A //This script controls the respawning of creatures from the holes in the ceiling. state Base { Conditions { if MissionMode == 1 goto MissionMode if Message "NumSpawn1" > 0 goto InitialSpawn } Actions { } } state InitialSpawn { Conditions { } Actions { SetMessage "name=NumSpawn1" "Decrement=2" Idle "1" CreateCreatures "locator=spawn_1" "type=stormtrooper" "script=SpawnAttack" "yoffset=1.2" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" Idle "1" CreateCreatures "locator=spawn_1" "type=stormtrooper" "script=SpawnAttack" "yoffset=1.2" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" SetMessage "name=NumSpawn2" "Decrement=2" Idle "3" CreateCreatures "locator=spawn_2" "type=stormtrooper" "script=SpawnAttack" "yoffset=1.2" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" Idle "1" CreateCreatures "locator=spawn_2" "type=stormtrooper" "script=SpawnAttack" "yoffset=1.2" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" SetState "Update" } } state Update { Conditions { if EitherPlayerInTriggerArea "Spawn_1" == 1 and if PartyUnderCover == 0 and if Message "NumSpawn1" > 0 and if NumInSetAlive "1" < 3 goto Spawn_1 if EitherPlayerInTriggerArea "Spawn_2" == 1 and if PartyUnderCover == 0 and if Message "NumSpawn2" > 0 and if NumInSetAlive "1" < 3 goto Spawn_2 } Actions { } } state Spawn_1 { Conditions { if Message "NumSpawn1" == 0 goto Update } Actions { Idle "2" SetMessage "name=NumSpawn1" "Decrement=1" CreateCreatures "locator=spawn_1" "type=stormtrooper" "script=SpawnAttack" "yoffset=1.2" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" Idle "1" SetMessage "name=NumSpawn1" "Decrement=1" CreateCreatures "locator=spawn_1" "type=stormtrooper" "script=SpawnAttack" "yoffset=1.2" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" SetState "Update" } } state Spawn_2 { Conditions { if Message "NumSpawn2" == 0 goto Update } Actions { Idle "2" SetMessage "name=NumSpawn2" "Decrement=1" CreateCreatures "locator=spawn_2" "type=stormtrooper" "script=SpawnAttack" "yoffset=1.2" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" Idle "1" SetMessage "name=NumSpawn2" "Decrement=1" CreateCreatures "locator=spawn_2" "type=stormtrooper" "script=SpawnAttack" "yoffset=1.2" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" SetState "Update" } } state MissionMode { Conditions { } Actions { } }