//RetakeE ReferenceScript { Script=FreePlayDefend Source=Global ReturnState=Base Conditions { if PlayerOnObject "sml_box_014" == 0 and if PlayerOnObject "sml_box_07" == 0 and if InTriggerArea "Upper" == 0 and if PlayerInTriggerArea "Upper" == 0 } } state Base { Conditions { if OnGround == 1 and if InTriggerArea "Upper" == 0 and if Message "CanBigJumpToBalcony" == 1 and if PlayerInTriggerArea "Upper" == 1 and if PlayerOnGround == 1 and if PlayerOnObject "sml_box_014" == 0 and if PlayerOnObject "sml_box_07" == 0 goto GoToBigJumpLocator if PlayerOnObject "sml_box_014" == 1 goto GoToRightBox if PlayerOnObject "sml_box_07" == 1 goto GoToLeftBox if EitherPlayerOnDoorTrigger "palace_window_1" == 1 goto DoorTrigger } Actions { FollowPlayer "1" } } state GoToRightBox { Conditions { if PlayerInTriggerArea "Upper" == 0 and if PlayerOnObject "sml_box_014" == 0 goto Base if OnObject "sml_box_07" == 1 goto OnRightBox } Actions { CycleCharacter "time=0.5" "Catagory=Jedi" GoToLocator "name" "right_box" } } state OnRightBox { Conditions { if PlayerInTriggerArea "Upper" == 0 and if PlayerOnObject "sml_box_014" == 0 goto Base if PlayerInTriggerArea "Upper" == 1 and if PlayerOnGround == 1 and if PlayerOnObject "sml_box_014" == 0 goto BigJump if PlayerUsingForce "sml_box_07" == 1 goto UseForceRightBox if OnObject "sml_box_07" == 0 goto GoToRightBox } Actions { CycleCharacter "time=0.5" "Catagory=Jedi" FacePlayer } } state UseForceRightBox { Conditions { if PlayerInTriggerArea "Upper" == 0 and if PlayerOnObject "sml_box_014" == 0 goto Base if PlayerInTriggerArea "Upper" == 1 and if PlayerOnGround == 1 and if PlayerOnObject "sml_box_014" == 0 goto BigJump if PlayerUsingForce "sml_box_07" == 0 goto GoToRightBox if OnObject "sml_box_07" == 0 goto GoToRightBox } Actions { CycleCharacter "time=0.5" "Catagory=Jedi" UseForce "sml_box_014" } } state GoToLeftBox { Conditions { if PlayerInTriggerArea "Upper" == 0 and if PlayerOnObject "sml_box_07" == 0 goto Base if OnObject "sml_box_014" == 1 goto OnLeftBox } Actions { CycleCharacter "time=0.5" "Catagory=Jedi" GoToLocator "name" "left_box" } } state OnLeftBox { Conditions { if PlayerInTriggerArea "Upper" == 0 and if PlayerOnObject "sml_box_07" == 0 goto Base if PlayerInTriggerArea "Upper" == 1 and if PlayerOnGround == 1 and if PlayerOnObject "sml_box_07" == 0 goto BigJump if PlayerUsingForce "sml_box_014" == 1 goto UseForceLeftBox if OnObject "sml_box_014" == 0 goto GoToLeftBox } Actions { CycleCharacter "time=0.5" "Catagory=Jedi" FacePlayer } } state UseForceLeftBox { Conditions { if PlayerInTriggerArea "Upper" == 0 and if PlayerOnObject "sml_box_07" == 0 goto Base if PlayerInTriggerArea "Upper" == 1 and if PlayerOnGround == 1 and if PlayerOnObject "sml_box_07" == 0 goto BigJump if PlayerUsingForce "sml_box_014" == 0 goto GoToLeftBox if OnObject "sml_box_014" == 0 goto GoToLeftBox } Actions { CycleCharacter "time=0.5" "Catagory=Jedi" UseForce "sml_box_07" } } state BigJump { Conditions { } Actions { CycleCharacter "time=0.5" "Catagory=Jedi" BigJumpToLocator "name=Top_0" "jump_factor=0.5" SetState "Base" } } state GoToBigJumpLocator { Conditions { if PlayerInTriggerArea "Upper" == 0 goto Base } Actions { CycleCharacter "time=0.5" "Catagory=Jedi" SetLocator "name=Bottom" "nearest" GoToLocator SetLocator "name=Top" "nearest" BigJumpToLocator SetState "Base" } } state DoorTrigger { Conditions { if EitherPlayerOnDoorTrigger "palace_window_1" == 0 and if DoorOpen "palace_window_1" == 0 goto Base if EitherPlayerOnDoorTrigger "palace_window_1" == 0 and if DoorOpen "palace_window_1" == 1 goto JustOpenedDoor } Actions { GoToDoorTrigger "name" "palace_window_1" "waittime=2" } } state JustOpenedDoor { Conditions { } Actions { Idle "2" SetState "Base" } }