//DookuC state Base { Conditions { if FreePlay == 0 goto NormalIntro if PreviousResult == 1 goto FreePlayIntro } Actions { DontUseShadowTerrain SetLocator "name=Dooku_Start" SetBoss CanSeeBehind SetDefensive "FALSE" KeepWeaponOut "FALSE" SetHitPoints "10" } } //Intro state NormalIntro { Conditions { if CutSceneFinished "ep2_countdooku_dookufight" == 1 goto NormalIntro2 } Actions { PlayCutScene "name=ep2_countdooku_dookufight" } } state NormalIntro2 { Conditions { } Actions { SnapToLocator "name=dooku_start" SnapToLocator "character=player" "name=start_0" SnapToLocator "character=player_2" "name=start_1" SetDefensive KeepWeaponOut SetState "Stage1_Start" } } state FreePlayIntro { Conditions { if Message "PlayersReady" == 2 goto FreePlayIntro2 } Actions { SetMessage "name=PlayersReady" "value=0" CameraCut "campos_x=1.10" "campos_y=1.0" "campos_z=0.2" "tgt_character=Player0" "FollowTgt" "end_time=999" "blend_out_time=1" SetAIOverrideControl "character=player" SetScriptState "character=player" "state=MiniCut" SetAIOverrideControl "character=player_2" SetScriptState "character=player_2" "state=MiniCut" GoToLocator FacePlayer } } state FreePlayIntro2 { Conditions { } Actions { SetDefensive KeepWeaponOut CameraCut "campos_x=-2.91" "campos_y=0.76" "campos_z=0.2" "tgt_character=AI_DOOKU" "FollowTgt" "end_time=2" "blend_out_time=0.5" FacePlayer "2" SetState "Stage1_Start" } } /////////////////////Stage 1///////////////////// //Fight state Stage1_Start { Conditions { } Actions { CanSeeBehind SetViewDistance "10" SetMinViewHeight "-99" SetMessage "name=ShowHearts" "value=1" SetState "Stage1_Fight" } } state Stage1_Fight { Conditions { if CheatProgress == 1 goto Stage2_Start if BeenHit == 1 and if HitPoints < 8 goto Stage2_Start } Actions { AttackOpponent "range 0.5" } } /////////////////////Stage 2///////////////////// //Chucking force objects state Stage2_Start { Conditions { } Actions { SetMessage "name=ShowHearts" "value=0" SetInvulnerable "still_do_take_hit_anim" SetHitPoints "7" "dont_set_max" CameraCut "use_current_campos" "tgt_character=AI_DOOKU" "FollowTgt" "blend_in_time=0.5" "end_time=infinite" "no_borders" FacePlayer "0.5" BigJumpToLocator SetForceBack CameraCut "use_current_campos" "tgt_character=AI_DOOKU" "FollowTgt" "end_time=1" "blend_out_time=0.5" "no_borders" SetMessage "name=NumHits" "value=3" SetState "Stage2_WaitBeforeThrowing" } } state Stage2_BeenHit { Conditions { if Message "NumHits" == 0 goto Stage3_Start if PreviousResult > 0 goto Stage2_WaitBeforeThrowing } Actions { SetMessage "name=NumHits" "decrement=1" } } state Stage2_WaitBeforeThrowing { Conditions { if CheatProgress == 1 goto Stage3_Start if BeenHit == 1 goto Stage2_BeenHit } Actions { GoToLocator FacePlayer "3" SetState "Stage2_CheckRange" } } state Stage2_CheckRange { Conditions { if OpponentRange > 5 goto Stage2_BigJumpToOpponent if PreviousResult < 6 goto Stage2_ThrowObject } Actions { } } state Stage2_ThrowObject { Conditions { if CheatProgress == 1 goto Stage3_Start if BeenHit == 1 goto Stage2_BeenHit } Actions { ;UseForce "throwable" "name=projectile_01" "name=projectile_02" "name=projectile_03" "name=projectile_04" "name=projectile_05" "name=projectile_06" UseForce "throwable" "name=projectile_02" "name=projectile_03" "name=projectile_04" SetState "Stage2_WaitBeforeThrowing" } } state Stage2_BigJumpToOpponent { Conditions { } Actions { SetForceBack "FALSE" BigJump "tgt_character=player" "slam" FacePlayer "1" BigJumpToLocator SetForceBack "TRUE" SetState "Stage2_WaitBeforeThrowing" } } /////////////////////Stage 3///////////////////// //Fight state Stage3_Start { Conditions { if FreePlay == 0 goto Stage3_StartYodaIntro if PreviousResult == 1 goto Stage3_Fight } Actions { SetMessage "name=ShowHearts" "value=1" SetForceBack "FALSE" SetInvulnerable } } state Stage3_StartYodaIntro { Conditions { } Actions { RemoveThrownForceObjects SetMessage "name=ActivateYoda" "value=1" Idle "1" SetTaggable "character=anakin_padawan" "FALSE" TagCharacter "character=player" "tag_to=Yoda" TagCharacter "character=player_2" "tag_to=ObiWanKenObi_JediMaster" SnapToLocator "character=player" "name=start_0" SnapToLocator "character=player_2" "name=start_1" SnapWeaponOut "character=player" SnapWeaponOut "character=player_2" SetScriptState "character=anakin_padawan" "state=Disabled" PlayCutScene "name=ep2_countdooku_masteryodaarrives" SetState "Stage3_WaitForCutScene" } } state Stage3_WaitForCutScene { Conditions { if CutSceneFinished "ep2_countdooku_masteryodaarrives" == 1 goto Stage3_Fight } Actions { } } state Stage3_Fight { Conditions { if CheatProgress == 1 goto Stage4_Start if BeenHit == 1 and if HitPoints < 5 goto Stage4_Start } Actions { SetInvulnerable "FALSE" AttackOpponent "range 0.5" } } /////////////////////Stage 4///////////////////// //Lightning attack state Stage4_Start { Conditions { } Actions { SetMessage "name=ShowHearts" "value=0" SetInvulnerable "still_do_take_hit_anim" SetHitPoints "4" "dont_set_max" CameraCut "use_current_campos" "tgt_character=AI_DOOKU" "FollowTgt" "blend_in_time=0.5" "end_time=infinite" "no_borders" FacePlayer "0.5" BigJumpToLocator SetForceBack CameraCut "use_current_campos" "tgt_character=AI_DOOKU" "FollowTgt" "end_time=1" "blend_out_time=0.5" "no_borders" SetMessage "name=NumHits" "value=3" SetState "Stage4_WaitBeforeLightningAttack" } } state Stage4_BeenHit { Conditions { if Message "NumHits" == 0 goto Stage5_Start if PreviousResult > 0 goto Stage4_WaitBeforeLightningAttack } Actions { SetMessage "name=NumHits" "decrement=1" } } state Stage4_ForceLightningAttack { Conditions { } Actions { SetForceLightningTarget "target=Player0" SetState "Stage4_WaitBeforeLightningAttack" } } state Stage4_WaitBeforeLightningAttack { Conditions { if CheatProgress == 1 goto Stage5_Start if BeenHit == 1 goto Stage4_BeenHit } Actions { GoToLocator FacePlayer "3" SetState "Stage4_CheckRange" } } state Stage4_CheckRange { Conditions { if UsingForceLightning == 1 goto Stage4_WaitBeforeLightningAttack if OpponentRange > 5 goto Stage4_BigJumpToOpponent if PreviousResult < 6 goto Stage4_LightningAttack } Actions { } } state Stage4_LightningAttack { Conditions { if CheatProgress == 1 goto Stage5_Start if BeenHit == 1 goto Stage4_BeenHit } Actions { SetForceLightningTarget "target=Player0" SetState "Stage4_WaitBeforeLightningAttack" } } state Stage4_BigJumpToOpponent { Conditions { } Actions { SetForceBack "FALSE" BigJump "tgt_character=player" "slam" FacePlayer "1" BigJumpToLocator SetForceBack "TRUE" SetState "Stage4_WaitBeforeLightningAttack" } } /////////////////////Stage 5///////////////////// //Fight state Stage5_Start { Conditions { } Actions { SetInvulnerable "FALSE" SetMessage "name=ShowHearts" "value=1" SetForceBack "FALSE" SetState "Stage5_Fight" } } state Stage5_Fight { Conditions { if HitPoints == 0 goto FightOver } Actions { AttackOpponent "range 0.5" } } state FightOver { Conditions { } Actions { CameraCut "use_current_campos" "tgt_character=AI_DOOKU" "FollowTgt" "blend_in_time=0.5" "end_time=infinite" "no_borders" FacePlayer } }