//SarlaccPit_C state Base { Conditions { } Actions { CnxController "from=StepS1_A" "to=StepS1_B" "buildit=buildit3" "off_flag=BLOCK" "checkvisible" "bothways" CnxController "from=StepS1_b" "to=StepS1_c" "obj=leaf3" "off_flag=DBLJUMP" "checkvisible" "bothways" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=StepS2_A" "to=StepS2_B" "obj= ladderbuilt" "off_flag=BLOCK" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=TunnelDoor_A" "to=TunnelDoor_B" "obj=gate" "on_flag=BLOCK" "checkvisible" "on_frames=1TOlastframe" "bothways" CnxController "from=grate1_a" "to=grate1_b" "obj=grate5" "on_flag=BLOCK" "checkvisible" "on_frames=1TOlastframe" "bothways" SetMessage "name=Met_Leia" "value=1" AddLocatorGroup "name=Deck1" AddLocatorGroup "name=Deck2" AddLocatorGroup "name=Deck3" AddLocatorGroup "name=Deck4" SetMessage "name=NumSpawnDeck1" "value=6" SetMessage "name=NumSpawnDeck2" "value=6" SetMessage "name=NumSpawnDeck3" "value=6" SetMessage "name=NumSpawnDeck4" "value=6" Idle "5" SetState "Update" } } state Update { Conditions { if PartyUnderCover == 0 and if Timer > 0 and if Message "NumSpawnDeck1" > 0 and if NumInSetAlive "1" < 3 and if PlayerInTriggerArea "Deck_1" == 1 goto Spawn_1 if PartyUnderCover == 0 and if Timer > 0 and if Message "NumSpawnDeck2" > 0 and if NumInSetAlive "1" < 3 and if PlayerInTriggerArea "Deck_2" == 1 goto Spawn_2 if PartyUnderCover == 0 and if Timer > 0 and if Message "NumSpawnDeck3" > 0 and if NumInSetAlive "1" < 3 and if PlayerInTriggerArea "Deck_3" == 1 goto Spawn_3 if PartyUnderCover == 0 and if Timer > 0 and if Message "NumSpawnDeck4" > 0 and if NumInSetAlive "1" < 3 and if PlayerInTriggerArea "Deck_4" == 1 goto Spawn_4 if Timer > 10 and if NumInSetAlive "1" == 0 and if Message "NumSpawnDeck1" == 0 and if PlayerInTriggerArea "Deck_1" == 1 goto ReSpawn_1 if Timer > 10 and if NumInSetAlive "1" == 0 and if Message "NumSpawnDeck2" == 0 and if PlayerInTriggerArea "Deck_2" == 1 goto ReSpawn_2 if Timer > 10 and if NumInSetAlive "1" == 0 and if Message "NumSpawnDeck3" == 0 and if PlayerInTriggerArea "Deck_3" == 1 goto ReSpawn_3 if Timer > 10 and if NumInSetAlive "1" == 0 and if Message "NumSpawnDeck4" == 0 and if PlayerInTriggerArea "Deck_4" == 1 goto ReSpawn_4 } Actions { } } ////// state Spawn_1 { Conditions { if Random < 0.5 goto Spawn_1a if AlwaysTrue == 1 goto Spawn_1b } Actions { } } state Spawn_1a { Conditions { if Message "NumSpawnDeck1" == 0 goto Update } Actions { CreateCreatures "locator_group=deck1" "type=GamorreanGuard" "script=GamorreanGuard" "yoffset=4" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" Idle "mintime=0.1" "maxtime=0.5" SetMessage "name=NumSpawnDeck1" "decrement=1" CreateCreatures "locator_group=deck1" "type=GamorreanGuard" "script=GamorreanGuard" "yoffset=4" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" SetMessage "name=NumSpawnDeck1" "decrement=1" ResetTimer "mintime=-8" "maxtime=-3" SetState "Update" } } state Spawn_1b { Conditions { if Message "NumSpawnDeck1" == 0 goto Update } Actions { CreateCreatures "locator_group=deck1" "type=skiffguard" "script=SpawnAttack" "yoffset=4" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" Idle "mintime=0.1" "maxtime=0.5" SetMessage "name=NumSpawnDeck1" "decrement=1" CreateCreatures "locator_group=deck1" "type=skiffguard" "script=SpawnAttack" "yoffset=4" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" SetMessage "name=NumSpawnDeck1" "decrement=1" ResetTimer "mintime=-8" "maxtime=-3" SetState "Update" } } state ReSpawn_1 { Conditions { } Actions { SetMessage "name=NumSpawnDeck1" "value=3" SetState "Spawn_1" } } ////// state Spawn_2 { Conditions { if Random < 0.5 goto Spawn_2a if AlwaysTrue == 1 goto Spawn_2b } Actions { } } state Spawn_2a { Conditions { if Message "NumSpawnDeck2" == 0 goto Update } Actions { CreateCreatures "locator_group=deck2" "type=GamorreanGuard" "script=GamorreanGuard" "yoffset=4" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" Idle "mintime=0.1" "maxtime=0.5" SetMessage "name=NumSpawnDeck2" "decrement=1" CreateCreatures "locator_group=deck2" "type=GamorreanGuard" "script=GamorreanGuard" "yoffset=4" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" SetMessage "name=NumSpawnDeck2" "decrement=1" ResetTimer "mintime=-8" "maxtime=-3" SetState "Update" } } state Spawn_2b { Conditions { if Message "NumSpawnDeck2" == 0 goto Update } Actions { CreateCreatures "locator_group=deck2" "type=skiffguard" "script=SpawnAttack" "yoffset=4" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" Idle "mintime=0.1" "maxtime=0.5" SetMessage "name=NumSpawnDeck2" "decrement=1" CreateCreatures "locator_group=deck2" "type=skiffguard" "script=SpawnAttack" "yoffset=4" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" SetMessage "name=NumSpawnDeck2" "decrement=1" ResetTimer "mintime=-8" "maxtime=-3" SetState "Update" } } state ReSpawn_2 { Conditions { } Actions { SetMessage "name=NumSpawnDeck2" "value=3" SetState "Spawn_2" } } ////// state Spawn_3 { Conditions { if Random < 0.5 goto Spawn_3a if AlwaysTrue == 1 goto Spawn_3b } Actions { } } state Spawn_3a { Conditions { if Message "NumSpawnDeck3" == 0 goto Update } Actions { CreateCreatures "locator_group=deck3" "type=GamorreanGuard" "script=GamorreanGuard" "yoffset=6" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" Idle "mintime=0.1" "maxtime=0.5" SetMessage "name=NumSpawnDeck3" "decrement=1" CreateCreatures "locator_group=deck3" "type=GamorreanGuard" "script=GamorreanGuard" "yoffset=6" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" SetMessage "name=NumSpawnDeck3" "decrement=1" ResetTimer "mintime=-8" "maxtime=-3" SetState "Update" } } state Spawn_3b { Conditions { if Message "NumSpawnDeck3" == 0 goto Update } Actions { CreateCreatures "locator_group=deck3" "type=skiffguard" "script=SpawnAttack" "yoffset=6" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" Idle "mintime=0.1" "maxtime=0.5" SetMessage "name=NumSpawnDeck3" "decrement=1" CreateCreatures "locator_group=deck3" "type=skiffguard" "script=SpawnAttack" "yoffset=6" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" SetMessage "name=NumSpawnDeck3" "decrement=1" ResetTimer "mintime=-8" "maxtime=-3" SetState "Update" } } state ReSpawn_3 { Conditions { } Actions { SetMessage "name=NumSpawnDeck3" "value=3" SetState "Spawn_3" } } ////// state Spawn_4 { Conditions { if Random < 0.5 goto Spawn_4a if AlwaysTrue == 1 goto Spawn_4b } Actions { } } state Spawn_4a { Conditions { if Message "NumSpawnDeck4" == 0 goto Update } Actions { CreateCreatures "locator_group=deck4" "type=GamorreanGuard" "script=GamorreanGuard" "yoffset=4" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" Idle "mintime=0.1" "maxtime=0.5" SetMessage "name=NumSpawnDeck4" "decrement=1" CreateCreatures "locator_group=deck4" "type=GamorreanGuard" "script=GamorreanGuard" "yoffset=4" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" SetMessage "name=NumSpawnDeck4" "decrement=1" ResetTimer "mintime=-8" "maxtime=-3" SetState "Update" } } state Spawn_4b { Conditions { if Message "NumSpawnDeck4" == 0 goto Update } Actions { CreateCreatures "locator_group=deck4" "type=skiffguard" "script=SpawnAttack" "yoffset=4" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" Idle "mintime=0.1" "maxtime=0.5" SetMessage "name=NumSpawnDeck4" "decrement=1" CreateCreatures "locator_group=deck4" "type=skiffguard" "script=SpawnAttack" "yoffset=4" "dont_set_on_surface" "zipdown" "fall_chance=0.2" "AddToSet=1" AlertCreatures "character=player" SetMessage "name=NumSpawnDeck4" "decrement=1" ResetTimer "mintime=-8" "maxtime=-3" SetState "Update" } } state ReSpawn_4 { Conditions { } Actions { SetMessage "name=NumSpawnDeck4" "value=3" SetState "Spawn_4" } }