state InActive { Conditions { if Message "KaminoEProgress" == 0 goto Activate } Actions { } } state Activate { Conditions { } Actions { Activate ;Activate starts the creature. Will be started at position calculated in AllocatedPickup } } state Base { Conditions { if Message "JangoFight" == 1 goto StartFight } Actions { SetSide "neutral" SetInvulnerable CameraCut "use_current_campos" "tgt_character=AI_JANGO" "FollowTgt" "blend_in_time=0" "end_time=infinite" GoToLocator "name" "shootroof" "waittime=0.5" MakeExplosion "type=EXPLO_05" "x=41.35" "y=-1.53" "z=8.96" JudderGameCamera "axis=x" "time=-0.4" SetMessage "name=CanSpawn" "value=1" UnLockDoor "door_cover" OpenDoor "door_cover" "stayopen" UnLockDoor "R4_door_10" OpenDoor "R4_door_10" "stayopen" GoToLocator "name" "end" CloseDoor "R4_door_10" LockDoor "R4_door_10" SetDoorFinished "R4_door_10" "FALSE" SetMessage "name=KaminoEProgress" "value=1" CameraCut "use_current_campos" "tgt_character=AI_JANGO" "FollowTgt" "blend_out_time=0.5" "end_time=0.5" GoToLocator "name" "end" FacePlayer } } state StartFight { Conditions { } Actions { SetDoomedEscapeLocator "name=CENTRE" SetMessage "name=JangoFight" "value=1" SetInvulnerable "FALSE" SetPathCnxFlag "from=bridge1_a" "to=bridge1_b" "BLOCK" "TRUE" "bothways" //Snap everyone to their start. SetMessage "name=DontFollowJango" "value=1" SnapWeaponOut "keep_out=TRUE" SnapWeaponOut "character=player" SnapWeaponOut "character=player_2" SnapToLocator "name=Wait" SnapToLocator "character=player" "name=Player_0" SnapToLocator "character=player_2" "name=Player_1" ;JudderGameCamera "axis=x" "time=-1" CameraCut "campos_x=46.57" "campos_y=-1.65" "campos_z=7.64" "tgt_obj=slave1" "FollowTgt" "end_time=12" "blend_out_time=1" CameraShake "mul=0.5" "time=12" "speed=5" Idle "13" SetMessage "name=DontFollowJango" "value=0" SetState "Stage1_Start" } } //==========Stage 1================= state Stage1_Start { Conditions { } Actions { SetSide "baddie" SetBoss SetInvulnerable CanShootOffScreen CanSeeBehind SetViewDistance "10" SetMinViewHeight "-99" SetHitPoints "10" PressActionButton FacePlayer "0.5" GoToLocator "name" "Centre" SetMessage "name=ShowHearts" "value=1" SetState "Stage1_Fight" } } state Stage1_Fight { Conditions { if HitPoints < 8 goto Stage2_Start } Actions { SetInvulnerable "FALSE" EngageOpponent "goalrange 2.5" "firerange 4" } } //==========Stage 2================= state Stage2_Start { Conditions { } Actions { SetMessage "name=ResetTurrets" "value=1" SetState "Stage2_GoToHover" } } state Stage2_GoToHover { Conditions { } Actions { SetMessage "name=Slave1CanFire" "value=0" SetInvulnerable DontPush SetGravityHeight "default" SetHoverPhase SetGravityHeight "0.6" GoToLocator "name" "centre" "xz_rangecheck" SetMessage "name=Slave1CanFire" "value=1" FacePlayer "1" SetInvulnerable "FALSE" DontPush "FALSE" SetState "Stage2_Fight" } } state Stage2_Fight { Conditions { if HoverPhase == 0 goto Stage2_GoToHover if HitPoints < 5 goto Stage3_Start } Actions { EngageOpponent "goalrange 1.5" "firerange 3" } } //==========Stage 3================= state Stage3_Start { Conditions { } Actions { SetInvulnerable SetMessage "name=ResetTurrets" "value=1" SetState "Stage3_SetLeftLocator" } } state Stage3_GoToHover { Conditions { } Actions { SetMessage "name=Slave1CanFire" "value=0" SetInvulnerable DontPush SetGravityHeight "default" SetHoverPhase SetGravityHeight "0.6" SetMessage "name=Slave1CanFire" "value=1" FacePlayer "1" SetInvulnerable "FALSE" DontPush "FALSE" SetState "Stage3_Fight" } } state Stage3_SetLeftLocator { Conditions { } Actions { SetLocator "name=Jango_Left" SetState "Stage3_GoToLocator" } } state Stage3_SetRightLocator { Conditions { } Actions { SetLocator "name=Jango_Right" SetState "Stage3_GoToLocator" } } state Stage3_GoToLocator { Conditions { } Actions { SetInvulnerable DontPush GoToLocator "xz_rangecheck" FacePlayer "1" SetInvulnerable "FALSE" DontPush "FALSE" SetState "Stage3_Fight" } } state Stage3_Fight { Conditions { if HoverPhase == 0 goto Stage3_GoToHover if HitPoints < 2 goto Stage4_Start if BeenHit == 1 and if CurrentLocatorIs "Jango_Left" == 1 goto Stage3_SetRightLocator if BeenHit == 1 and if CurrentLocatorIs "Jango_Right" == 1 goto Stage3_SetLeftLocator } Actions { PressTagButton FacePlayer "5" SetState "Stage3_Fight" } } //==========Stage 4================= state Stage4_Start { Conditions { } Actions { ; SetMessage "name=ResetTurrets" "value=1" KeepWeaponOut "FALSE" CanDefend "FALSE" SetMessage "name=Slave1CanFire" "value=0" SetHoverPhase "FALSE" SetGravityHeight "default" SetInvulnerable "FALSE" SetRunSpeed "1.5" SetState "Stage4_RunAway" } } state Stage4_RunAway { Conditions { if OpponentRange > 2 goto Stage4_Rest if Timer > 2 goto Stage4_SlowDown } Actions { ResetTimer MoveAwayFromOpponent "2.5" } } state Stage4_Rest { Conditions { if OpponentRange < 1.5 goto Stage4_RunAway ; if Timer > 2 goto Stage4_SpeedUp } Actions { ResetTimer FacePlayer } } state Stage4_SlowDown { Conditions { } Actions { SetRunSpeed "max=default" "multiply=0.95" ;MoveAwayFromOpponent "2.5" SetState "Stage4_RunAway" } } state Stage4_SpeedUp { Conditions { } Actions { SetRunSpeed "max=default" "multiply=1.05" SetState "Stage4_Rest" } } /////////////////////////FREEPLAY state FreePlayMiniCut { Conditions { } Actions { SetMessage "name=DontFollowJango" "value=1" CameraCut "range=6" "rotx=15" "roty=160" "tgt_character=AI_JANGO" "FollowTgt" "blend_in_time=0" "end_time=infinite" GoToLocator "name" "wait" Idle "3" SetLastSafePathPos "character=player" SetAIOverrideControl "character=player" "FALSE" SetScriptState "character=player" "state=Base" SetLastSafePathPos "character=player_2" SetAIOverrideControl "character=player_2" "FALSE" SetScriptState "character=player" "state=Base" SetState "StartFight" } }