//CloudCityEscape_A //Note: HP is set before the Wait states well invunerable, so that if the state resets for any reason, it wont reset the HPs, so breaking stuff state Base { Conditions { } Actions { SetBoss DontPush SetInvulnerable IgnoreSlideTerrain CanSeeBehind SetViewDistance "5" SetRunSpeed "default" SetRunSpeed "multiply=1.25" //HP for WaitAtStart SetHitPoints "5" "dont_set_max" SetState "WaitAtStart" } } state WaitAtStart { Conditions { if BeenHit == 1 goto GoToStairs if NearestPlayerRange < 3.25 goto GoToStairs if HitPoints < 3 goto GoToStairs if OriginRange > 0.5 goto WaitAtStart } Actions { SetInvulnerable "FALSE" DontPush GoToOrigin EngageOpponent "static" "firerange 99" } } state GoToStairs { Conditions { if LocatorRangeXZ < 1.2 goto BigJump } Actions { SetInvulnerable DontPush "FALSE" //HP for WaitAtTopOfStairs SetHitPoints "5" SetMessage "name=NumSpawn1" "Value=4" SetMessage "name=NumSpawn2" "Value=6" SetLocator "name=Boba_1" GoToLocator SetState "WaitAtTopOfStairs" } } state BigJump { Conditions { } Actions { BigJumpToLocator SetState "WaitAtTopOfStairs" } } state WaitAtTopOfStairs { Conditions { if NearestPlayerRange < 4 goto PullStairLever if HitPoints < 3 goto PullStairLever if LocatorRange > 0.5 goto WaitAtTopOfStairs } Actions { SetInvulnerable "FALSE" DontPush GoToLocator EngageOpponent "static" "firerange 99" } } ;For if he accidently slips down the stairs state BigJump2 { Conditions { } Actions { SetLocator "name=Boba_1" BigJumpToLocator SetState WaitByDoor } } state PullStairLever { Conditions { if InTriggerArea "Spawn_2" == 1 goto BigJump2 } Actions { SetInvulnerable DontPush "FALSE" //HP for WaitByDoor SetHitPoints "8" PullLever "name=stairs_lever1" SetLocator "name=Boba_2" GoToLocator SetState "WaitByDoor" } } state WaitByDoor { Conditions { if InTriggerArea "Spawn_2" == 1 goto BigJump2 if NearestPlayerRange < 3 goto GoThroughDoor if HitPoints < 3 goto GoThroughDoor if LocatorRange > 0.5 goto WaitByDoor } Actions { SetInvulnerable "FALSE" GoToLocator EngageOpponent "static" "firerange 99" } } state GoThroughDoor { Conditions { } Actions { SetInvulnerable SetLocator "name=Boba_3" GoToLocator SetState "WaitInRoom" } } state WaitInRoom { Conditions { if NearestPlayerRange < 3 goto StartFight if BeenHit == 1 goto StartFight if LocatorRange > 0.5 goto WaitInRoom } Actions { GoToLocator EngageOpponent "static" "firerange 99" } } /*************** BOBA FIGHT ****************/ state StartFight { Conditions { } Actions { SetHitPoints "5" DontPush "FALSE" SetInvulnerable "FALSE" SetMessage "name=BobaFightStarted" "value=1.0" CameraCut "range=2" "end_time=2" "tgt_character=myself" "FollowTgt" "roty=90" "rotx=10" "blend_in_time=0.5" //SetState "FollowPlayer" PrefersPlayers SetState "HoverToLocator" } } state HoverToLocator { Conditions { if BeenHit == 1 and if Timer > 0.4 goto Fall if Timer > 10 goto ThrowGranade } Actions { ResetTimer SetInvulnerable GetLocatorFromGroup "name=boba_fight" "random" SetHoverPhase GoToLocator EngageOpponent "static" "firerange 99" //SetState HoverFight } } state Fall { Conditions { if HitPoints < 2 goto EndFight_ExitRoom if BeenHit == 1 and if Timer > 0.2 goto HoverToLocator if Timer > 5 goto HoverToLocator } Actions { ResetTimer SetInvulnerable "FALSE" SetHoverPhase "FALSE" OverrideAnimation "from=all" "to=takehit" EngageOpponent "goalrange 1.5" "firerange=3" } } state ThrowGranade { Conditions { if BeenHit == 1 goto Fall } Actions { //PressSpecialButton ThrowThermal SetState "HoverToLocator" } } state EndFight_ExitRoom { Conditions { if Timer > 10 goto BigJumpEndFight } Actions { DontPush SetInvulnerable ResetTimer Idle "1" SetLocator "name=exit_fight" GoToLocator SetState EndFight_RunToPanel } } state EndFight_RunToPanel { Conditions { } Actions { SetMessage "name=BobaFightStarted" "value=0.0" SetLocator "name=Boba_4" GoToLocator SetState "WaitByPanel" } } state BigJumpEndFight { Conditions { } Actions { SetLocator "name=exit_fight" BigJumpToLocator SetState EndFight_RunToPanel } } /*************** BOBA FIGHT END ****************/ state WaitByPanel { Conditions { if NearestPlayerRange < 3 and if ObstacleAtStart "bounty_door1" == 1 goto UsePanel if NearestPlayerRange < 3 goto Wait1 if BeenHit == 1 goto UsePanel if LocatorRange > 0.5 goto WaitByPanel } Actions { GoToLocator EngageOpponent "static" "firerange 99" } } state TestUsePanel { Conditions { } Actions { SnapToLocator "name=Boba_4" SetState "UsePanel" } } state UsePanel { Conditions { } Actions { CameraCut "range=3" "roty=300" "rotx=10" "tgt_character=ai_bobafett" "FollowTgt" "blend_in_time=1" "end_time=15" "nxo_borders" FacePlayer "1" PullLever "name=bounty_door1" EndCameraCut "blend_out_time=1" "end_time=4" Idle "1" SetLocator "name=Boba_5" GoToLocator SetState "Wait1" } } state Wait1 { Conditions { if NearestPlayerRange < 1.5 goto RunAway1 if BeenHit == 1 goto RunAway1 if LocatorRange > 0.5 goto Wait1 } Actions { GoToLocator EngageOpponent "static" "firerange 99" } } state RunAway1 { Conditions { } Actions { SetLocator "name=Boba_6" GoToLocator SetState "Wait2" } } state Wait2 { Conditions { if NearestPlayerRange < 2.5 goto RunAway2 if BeenHit == 1 goto RunAway2 if LocatorRange > 0.5 goto Wait2 } Actions { GoToLocator EngageOpponent "static" "firerange 99" } } state RunAway2 { Conditions { } Actions { SetLocator "name=Boba_7" GoToLocator SetState "Wait3" } } state Wait3 { Conditions { if NearestPlayerRange < 2.5 goto RunAway3 if BeenHit == 1 goto RunAway3 if LocatorRange > 0.5 goto Wait3 } Actions { GoToLocator EngageOpponent "static" "firerange 99" } } state RunAway3 { Conditions { } Actions { CreateCreatures "locator=spawn_3" "type=stormtrooper" "script=SpawnAttack" CreateCreatures "locator=spawn_4" "type=stormtrooper" "script=SpawnAttack" CreateCreatures "locator=spawn_5" "type=stormtrooper" "script=SpawnAttack" CreateCreatures "locator=spawn_6" "type=stormtrooper" "script=SpawnAttack" CreateCreatures "locator=spawn_7" "type=stormtrooper" "script=SpawnAttack" SetLocator "name=Boba_8" GoToLocator Kill } }