//JediB state Base { Conditions { //Standard play if FreePlay == 0 and if Message "Phase" < 2 and if IAm "PadmeClawed" == 1 goto PadmeClawed_WaitForRescuePhase if FreePlay == 0 and if Message "Phase" < 3 and if IAm "Anakin_Padawan" == 1 goto Anakin_WaitForRescuePhase if FreePlay == 0 and if Message "Phase" < 4 and if IAm "ObiWanKenObi_JediMaster" == 1 goto ObiWanKenObi_WaitForRescuePhase //Freeplay if FreePlay == 1 and if IAmAPartyCharacter == 0 if Message "Phase" < 2 and if IAm "PadmeClawed" == 1 goto PadmeClawed_WaitForRescuePhase if FreePlay == 1 and if IAmAPartyCharacter == 0 if Message "Phase" < 3 and if IAm "Anakin_Padawan" == 1 goto Anakin_WaitForRescuePhase if FreePlay == 1 and if IAmAPartyCharacter == 0 if Message "Phase" < 4 and if IAm "ObiWanKenObi_JediMaster" == 1 goto ObiWanKenObi_WaitForRescuePhase //Hack if Random < 100 goto Free } Actions { } } state Free { ReferenceScript { Script=GenericDefend Source=Global ReturnState=Free Conditions { if EitherPlayerUsingForce "force_handle_02" == 0 and if EitherPlayerUsingForce "force_handle_01" == 0 } } Conditions { if CategoryIs "Jedi" == 1 and if EitherPlayerUsingForce "force_handle_02" == 1 goto UseForceHandle01 if CategoryIs "Jedi" == 1 and if EitherPlayerUsingForce "force_handle_01" == 1 goto UseForceHandle02 } Actions { FollowPlayer "0.75" } } state UseForceHandle01 { Conditions { if EitherPlayerUsingForce "force_handle_02" == 0 goto Free } Actions { GoToLocator "name" "handle01" UseForce "force_handle_01" } } state UseForceHandle02 { Conditions { if EitherPlayerUsingForce "force_handle_01" == 0 goto Free } Actions { GoToLocator "name" "handle02" UseForce "force_handle_02" } } ///////////////////////////////Padme////////////////////// state PadmeClawed_WaitForRescuePhase { Conditions { if Message "Phase" == 1 goto PadmeClawed_RescuePhase } Actions { SetMessage "name=RestrainPadme" "value=1" SetLocator "name=Jump1" SetTaggable "FALSE" SetHitPoints "0" SetSide "neutral" DontPush SetDontMove OverrideAnimation "from=all" "to=TiedUp" } } state PadmeClawed_RescuePhase { Conditions { if Message "ObjectivesLeft" == 0 goto PadmeClawed_CanWinchDown } Actions { CameraCut "range=6" "rotx=15" "roty=135" "tgt_character=myself" "FollowTgt" "blend_out_time=0.5" "end_time=3" Idle "1" ActivateGadget "pillar1a" } } state PadmeClawed_CanWinchDown { Conditions { if ForceComplete "pillar1_01blow" == 1 goto PadmeClawed_JustBeenRescued } Actions { ActivateGadget "pillar1ba" } } state PadmeClawed_JustBeenRescued { Conditions { } Actions { SetMessage "name=RestrainPadme" "value=0" SetDontMove "FALSE" PressJumpButton GoToLocator Idle "1" SetHitPoints "4" SetSide "goody" DontPush "FALSE" OverrideAnimation "clear" Idle "1" SetMessage "name=PhaseComplete" "value=1" SetTaggable "TRUE" SetState "Free" } } ///////////////////////////////Anakin////////////////////// state Anakin_WaitForRescuePhase { Conditions { if Message "Phase" == 2 goto Anakin_RescuePhase } Actions { SetMessage "name=RestrainAnakin" "value=1" SetLocator "name=Jump2" SetTaggable "FALSE" SetHitPoints "0" SetSide "neutral" DontPush SetDontMove OverrideAnimation "from=all" "to=TiedUp" } } state Anakin_RescuePhase { Conditions { if Message "ObjectivesLeft" == 0 goto Anakin_CanWinchDown } Actions { CameraCut "range=6" "rotx=15" "roty=225" "tgt_character=myself" "FollowTgt" "blend_out_time=0.5" "end_time=3" Idle "1" ActivateGadget "pillar2a" } } state Anakin_CanWinchDown { Conditions { if ForceComplete "pillar2_01blow" == 1 goto Anakin_JustBeenRescued } Actions { ActivateGadget "pillar2ba" } } state Anakin_JustBeenRescued { Conditions { } Actions { SetMessage "name=RestrainAnakin" "value=0" SetDontMove "FALSE" PressJumpButton GoToLocator Idle "1" SetHitPoints "4" SetSide "goody" DontPush "FALSE" OverrideAnimation "clear" Idle "1" SetMessage "name=PhaseComplete" "value=1" SetTaggable "TRUE" SetState "Free" } } ///////////////////////////////ObiWan////////////////////// state ObiWanKenObi_WaitForRescuePhase { Conditions { if Message "Phase" == 3 goto ObiWanKenObi_RescuePhase } Actions { SetMessage "name=RestrainObiWan" "value=1" SetLocator "name=Jump3" SetTaggable "FALSE" SetHitPoints "0" SetSide "neutral" DontPush SetDontMove OverrideAnimation "from=all" "to=TiedUp" } } state ObiWanKenObi_RescuePhase { Conditions { if Message "ObjectivesLeft" == 0 goto ObiWanKenObi_CanWinchDown } Actions { CameraCut "range=6" "rotx=15" "roty=315" "tgt_character=myself" "FollowTgt" "blend_out_time=0.5" "end_time=3" Idle "1" ActivateGadget "pillar3a" } } state ObiWanKenObi_CanWinchDown { Conditions { if ForceComplete "pillar3_01blow" == 1 goto ObiWanKenObi_JustBeenRescued } Actions { ActivateGadget "pillar3ba" } } state ObiWanKenObi_JustBeenRescued { Conditions { } Actions { SetMessage "name=RestrainObiWan" "value=0" SetDontMove "FALSE" PressJumpButton GoToLocator Idle "1" SetHitPoints "4" SetSide "goody" DontPush "FALSE" OverrideAnimation "clear" SetMessage "name=PhaseComplete" "value=1" SetTaggable "TRUE" SetState "Free" } }