//CloudCityEscape_A //Sets // 1: Tea Party // 2: Citizen // 3: Gas Troopers state Base { Conditions { if MissionMode == 1 goto MissionMode if Message "A_Init" == 0 goto Init if Message "A_Init" == 1 goto Update } Actions { CnxController "from=door1_a" "to=door1_b" "off_flag=BLOCK" "obj=door_cp_1" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door2_a" "to=door2_b" "off_flag=BLOCK" "obj=door_parlour" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door3_a" "to=door3_b" "off_flag=BLOCK" "obj=door_bounty_1" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door4_a" "to=door4_b" "off_flag=BLOCK" "obj=door_r2_1" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door5_a" "to=door5_b" "off_flag=BLOCK" "obj=door_2" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" //CnxController "from=door6_a" "to=door6_b" "off_flag=BLOCK" "obj=door_cp_1" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door7_a" "to=door7_b" "off_flag=BLOCK" "obj=door_r2_2" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door8_a" "to=door8_b" "off_flag=BLOCK" "obj=door_cp_2" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" ;CnxController "from=stairs_a" "to=stairs_b" "on_flag=BLOCK" "obj=stair_2c" "checkvisible" "on_frames=1TOlastframe" "bothways" CnxController "from=stairs_a" "to=stairs_b" "on_flag=FORBADDIES" "obj=stair_2c" "checkvisible" "on_frames=1TOlastframe" "bothways" CnxController "from=lift1a" "to=lift1b" "off_flag=BLOCK" "obj=lift1_door_l" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=lift2a" "to=lift2b" "off_flag=BLOCK" "obj=lift1_door_l" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=gas_a" "to=gas_b" "on_flag=BLOCK" "obj=dummy_cloud" "checkvisible" "on_frames=1TOlastframe" "bothways" AddLocatorGroup "name=Gas_Trooper" AddLocatorGroup "name=citizen" AddLocatorGroup "name=boba_fight" } } state Init { Conditions { } Actions { SetMessage "name=TeaParty" "value=6" SetMessage "name=GasTrooper" "value=10" SetMessage "name=A_Init" "value=1" SetState "Update" } } state Update { Conditions { if Message "Built_C3PO" == 0 and if BuildItComplete "fixit_1" == 1 goto Built_C3PO if BeenToLevel "CloudCityEscape_B" == 1 and if ObstacleChainPhase "gas_1" == 1 goto TurnOnGas if NumInSetAlive "1" < 2 and if ObstacleAtStart "lift1_door" == 1 and if Random > 0.5 and if Message "TeaParty" > 0 goto SpawnTea1 if NumInSetAlive "1" < 2 and if ObstacleAtStart "lift2_door" == 1 and if Random > 0.5 and if Message "TeaParty" > 0 goto SpawnTea2 if EitherPlayerInTriggerArea "TO_B" == 1 and if NumInSetAlive "3" < 3 and if Message "GasTrooper" > 5 goto SpawnGasTroop if BeenToLevel "CloudCityEscape_B" == 1 and if EitherPlayerInTriggerArea "TO_B" == 1 and if NumInSetAlive "3" < 3 and if Message "GasTrooper" > 0 goto SpawnGasTroop if NumInSetAlive "2" < 10 goto ReinforceCitizen } Actions { } } state Built_C3PO { Conditions { } Actions { SetMessage "name=Built_C3PO" "value=1" SetState "Update" } } state TurnOnGas { Conditions { } Actions { SetObstacleChainPhase "gas_1" "phase=2" SetState "Update" } } state SpawnTea1 { Conditions { } Actions { CreateCreatures "locator=lift1_spawn" "type=StormTrooper" "script=SpawnAttack" "addtoset=1" SetMessage "name=TeaParty" "decrement=1" SetState "Update" } } state SpawnTea2 { Conditions { } Actions { CreateCreatures "locator=lift2_spawn" "type=StormTrooper" "script=SpawnAttack" "addtoset=1" SetMessage "name=TeaParty" "decrement=1" SetState "Update" } } state SpawnGasTroop { Conditions { } Actions { CreateCreatures "locator_group=Gas_Trooper" "type=StormTrooper" "script=SpawnAttack" "addtoset=3" "yoffset=2" "dont_set_on_surface" "zipdown" SetMessage "name=GasTrooper" "decrement=1" SetState "Update" } } state ReinforceCitizen { Conditions { } Actions { CreateCreatures "locator_group=Citizen" "type=cloudcitycitizen" "script=citizen" "addtoset=2" "off_screen" SetState "Update" } } state MissionMode { Conditions { } Actions { } }