//MosEisley_D state Base { Conditions { if MissionMode == 1 goto MissionMode if FreePlay == 0 goto Start if AlwaysTrue == 1 goto Update } Actions { AddLocatorGroup "name=zipspawn" AddLocatorGroup "name=Patrol" AddLocatorGroup "name=OutOfWay" CnxController "from=gate1_a" "to=gate1_b" "on_flag=BLOCK" "obj=big_gate_pop3" "checkvisible" "on_frames=1TOlastframe" "bothways" CnxController "from=gate2_a" "to=gate2_b" "on_flag=BLOCK" "obj=darkforce_1_1" "checkvisible" "on_frames=1TOlastframe" "bothways" CnxController "from=gate3_a" "to=gate3_b" "on_flag=BLOCK" "obj=darkforce_2_1" "checkvisible" "on_frames=1TOlastframe" "bothways" CnxController "from=gate4_a" "to=gate4_b" "on_flag=BLOCK" "obj=darkforce_3_1" "checkvisible" "on_frames=1TOlastframe" "bothways" CnxController "from=gate5_a" "to=gate5_b" "on_flag=BLOCK" "obj=darkforce_4_1" "checkvisible" "on_frames=1TOlastframe" "bothways" ;CnxController "from=door1_a" "to=door1_b" "off_flag=BLOCK" "obj=Spy_door10" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" } } state Start { Conditions { } Actions { SetMessage "name=MetObiAndChewy" "value=1" SetTaggable "character=LukeSkywalker_Tatooine" "FALSE" CannotDropIn "character=LukeSkywalker_Tatooine" NotWithParty "character=LukeSkywalker_Tatooine" SnapToLocator "character=LukeSkywalker_Tatooine" "name=EndTest" SetScriptState "character=LukeSkywalker_Tatooine" "state=RestOfParty" SetTaggable "character=BenKenobi" "FALSE" CannotDropIn "character=BenKenobi" NotWithParty "character=BenKenobi" SnapToLocator "character=BenKenobi" "name=EndTest" SetScriptState "character=BenKenobi" "state=RestOfParty" SetTaggable "character=R2D2" "FALSE" CannotDropIn "character=R2D2" NotWithParty "character=R2D2" SnapToLocator "character=R2D2" "name=EndTest" SetScriptState "character=R2D2" "state=RestOfParty" SetTaggable "character=C3PO" "FALSE" CannotDropIn "character=C3PO" NotWithParty "character=C3PO" SnapToLocator "character=C3PO" "name=EndTest" SetScriptState "character=C3PO" "state=RestOfParty" SetState "Update" } } state Update { Conditions { if FreePlay == 0 and if Message "HangarFight" == 0 and if EitherPlayerInTriggerArea "Hangar" == 1 goto StartHangarFight if Message "HangarFight" == 0 and if EitherPlayerInTriggerArea "Hangar" == 1 goto StartFight_Phase1 if Message "SpyCut" == 0 and if PlayerInTriggerArea "SpyCut" == 1 goto StartSpyCut if Message "SpyCut" == 0 and if PlayerInTriggerArea "SpyCut2" == 1 goto StartSpyCut //Make sure they havent outrun / shortcut the spy, so trapped in the cinema area //if ObstacleFinished "big_gate" == 1 and //if EitherPlayerInTriggerArea "SpyCut" == 1 goto OpenGate //if ObstacleFinished "big_gate" == 1 and //if EitherPlayerInTriggerArea "SpyCut2" == 1 goto OpenGate //Is there a better way that below?? Above seemed to work but then found it broken... if IsVisible "big_gate_pop3" == 1 and if EitherPlayerInTriggerArea "SpyCut" == 1 goto OpenGate if IsVisible "big_gate_pop3" == 1 and if EitherPlayerInTriggerArea "SpyCut2" == 1 goto OpenGate } Actions { } } state OpenGate { Conditions { } Actions { TriggerBlowUp "name=big_gate_pop3" TriggerBlowUp "name=big_gate_pop4" SetState "Update" } } state StartSpyCut { Conditions { } Actions { SetMessage "name=SpyCut" "value=1" SetScriptState "character=AI_Spy" "state=SpyCut" SetState "Update" } } ///// state StartHangarFight { Conditions { } Actions { SetTaggable "character=LukeSkywalker_Tatooine" CannotDropIn "character=LukeSkywalker_Tatooine" "FALSE" NotWithParty "character=LukeSkywalker_Tatooine" "FALSE" SetScriptState "character=LukeSkywalker_Tatooine" "state=Base" SetTaggable "character=BenKenobi" CannotDropIn "character=BenKenobi" "FALSE" NotWithParty "character=BenKenobi" "FALSE" SetScriptState "character=BenKenobi" "state=Base" SetTaggable "character=R2D2" CannotDropIn "character=R2D2" "FALSE" NotWithParty "character=R2D2" "FALSE" SetScriptState "character=R2D2" "state=Base" SetTaggable "character=C3PO" CannotDropIn "character=C3PO" "FALSE" NotWithParty "character=C3PO" "FALSE" SetScriptState "character=C3PO" "state=Base" SetState "StartFight_Phase1" } } ////////////// state StartFight_Phase1 { Conditions { if Message "ZipSpawn" == 0 and if Message "FightMiniCut" == 0 goto Update_Phase1 //Spy is responsible for setting this to 0. Spy creates creatures in set 10 } Actions { SetMessage "name=HangarFight" "value=1" SetMessage "name=FightMiniCut" "value=1" Kill "all_ai_except=AI_Spy" SetScriptState "character=AI_Spy" "state=StartFight_Phase1" } } state Update_Phase1 { Conditions { if NumInSetAlive "10" == 0 goto StartFight_Phase2 } Actions { } } ////////////// state StartFight_Phase2 { Conditions { if Message "ZipSpawn" == 0 and if Message "FightMiniCut" == 0 goto Update_Phase2 //Spy is responsible for setting this to 0. Spy creates creatures in set 10 } Actions { SetMessage "name=HangarFight" "value=2" SetMessage "name=FightMiniCut" "value=1" SetScriptState "character=AI_Spy" "state=StartFight_Phase2" } } state Update_Phase2 { Conditions { if NumInSetAlive "10" == 0 goto StartFight_Phase3 } Actions { } } ////////////// state StartFight_Phase3 { Conditions { if Message "ZipSpawn" == 0 and if Message "FightMiniCut" == 0 goto Update_Phase3 //Spy is responsible for setting this to 0. Spy creates creatures in set 10 } Actions { SetMessage "name=HangarFight" "value=3" SetMessage "name=FightMiniCut" "value=1" SetScriptState "character=AI_Spy" "state=StartFight_Phase3" } } state Update_Phase3 { Conditions { if IsAlive "AI_Spy" == 0 and if NumInSetAlive "10" == 0 goto FightOver } Actions { } } ////////////// state FightOver { Conditions { } Actions { SetMessage "name=HangarFight" "value=4" Idle "1" CameraCut "range=3.5" "roty=270" "rotx=15" "tgt_locator=camtgt" "FollowTgt" "blend_out_time=0.5" "end_time=3" "nXo_borders" Idle "1" PlayObstacle "name=falcon" "backwards" } } ////////////// state MissionMode { Conditions { } Actions { } }