//RetakeE state Base { Conditions { if IAm "anakin_boy" == 1 goto AnakinUpdate if IAm "r2d2" == 1 goto R2D2Update if CategoryIs "ZipUp" == 1 goto ZipUpUpdate if CategoryIs "Jedi" == 1 goto JediUpdate } Actions { } } //////////////////////Jedi Update/////////////////////////// state JediUpdate { ReferenceScript { Script=GenericDefend 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 } } 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 PlayerOnDoorTrigger "palace_window_1" == 1 goto JediGoToDoorTrigger } Actions { FollowPlayer "0.75" } } state GoToRightBox { Conditions { if PlayerCategoryIs "Jedi" == 0 goto Base if PlayerInTriggerArea "Upper" == 0 and if PlayerOnObject "sml_box_014" == 0 goto Base if OnObject "sml_box_07" == 1 goto OnRightBox } Actions { GoToLocator "name" "right_box" } } state OnRightBox { Conditions { if PlayerCategoryIs "Jedi" == 0 goto Base 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 { FacePlayer } } state UseForceRightBox { Conditions { if PlayerCategoryIs "Jedi" == 0 goto Base 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 { UseForce "sml_box_014" } } state GoToLeftBox { Conditions { if PlayerCategoryIs "Jedi" == 0 goto Base if PlayerInTriggerArea "Upper" == 0 and if PlayerOnObject "sml_box_07" == 0 goto Base if OnObject "sml_box_014" == 1 goto OnLeftBox } Actions { GoToLocator "name" "left_box" } } state OnLeftBox { Conditions { if PlayerCategoryIs "Jedi" == 0 goto Base 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 { FacePlayer } } state UseForceLeftBox { Conditions { if PlayerCategoryIs "Jedi" == 0 goto Base 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 { UseForce "sml_box_07" } } state BigJump { Conditions { } Actions { BigJumpToLocator "name=Top_0" "jump_factor=0.5" SetState "JediUpdate" } } state GoToBigJumpLocator { Conditions { if PlayerInTriggerArea "Upper" == 0 goto Base if RigidAnimFrame "flap1" == 1 goto GoToBigJumpLocator0 } Actions { SetLocator "name=Bottom" "nearest" GoToLocator SetLocator "name=Top" "nearest" BigJumpToLocator SetState "JediUpdate" } } state GoToBigJumpLocator0 { Conditions { if PlayerInTriggerArea "Upper" == 0 goto Base } Actions { SetLocator "name=Bottom_0" GoToLocator SetLocator "name=Top_0" BigJumpToLocator SetState "JediUpdate" } } //////////////////////Blaster Update/////////////////////////// state ZipUpUpdate { ReferenceScript { Script=GenericDefend Source=Global ReturnState=Base Conditions { if InTriggerArea "Upper" == 0 } } Conditions { if DoorOpened "palace_window_1" == 0 and if ObstacleChainPhase "zipup" == 3 goto GoToDoorTrigger if InTriggerArea "Upper" == 1 goto GoToDoorTrigger } Actions { FollowPlayer "1.5" } } //////////////////////Anakin Update/////////////////////////// state AnakinUpdate { ReferenceScript { Script=GenericDefend Source=Global ReturnState=Base Conditions { if InTriggerArea "Upper" == 0 } } Conditions { if DoorOpened "palace_window_1" == 0 and if RigidAnimFrame "anakin1" > 1 goto GoToDoorTrigger if InTriggerArea "Upper" == 1 goto GoToDoorTrigger } Actions { FollowPlayer "1.5" } } //////////////////////R2D2 Update/////////////////////////// state R2D2Update { ReferenceScript { Script=GenericDefend Source=Global ReturnState=Base Conditions { if InTriggerArea "Upper" == 0 } } Conditions { if DoorOpened "palace_window_1" == 0 and if ObstacleChainPhase "r2lift" == 2 goto GoToDoorTrigger if InTriggerArea "Upper" == 1 goto GoToDoorTrigger } Actions { FollowPlayer "1.5" } } ////////////Everyone/////////////// state GoToDoorTrigger { Conditions { if DoorOpened "palace_window_1" == 1 goto Base } Actions { GoToDoorTrigger "name" "palace_window_1" "waittime=2" } } state JediGoToDoorTrigger { 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" } }