#PARAM 1 shootrange 1.5 #PARAM 2 engagedist 1.5 PARAM 0 visibility 20 PARAM 1 shootrange 3.5 PARAM 2 engagedist 2.0 #--------------------------------------------- # Start state #--------------------------------------------- state Base { Conditions { if LevelValue "Boss" > 1 goto Enable } Actions { Disable #SetHitPoints "default 3" #NoAttack #NoLosCheck #Idle "mintime 1.5" "maxtime 4.0" #MessageWait "WOLFATTACK" "1.0" #SetState "Enable" NoRingSeg } } #--------------------------------------------- # Enables the character #--------------------------------------------- state Enable { Conditions { } Actions { Enable DontPush SetState "ManageState" } } #--------------------------------------------- # Level Controlled #--------------------------------------------- state LevelControlled { Conditions { if LevelValue "Boss" == 0 goto Base if previousresult == 1 goto Base if previousresult == 2 goto Patrol if previousresult == 5 goto Hide } Actions { DontPush #NoAttack } } state RunToTree { Conditions { if LevelValue "Boss" != 3 goto ManageState } Actions { GotoLocator "xz_rangecheck" "1.25" SetLevelValue "type Tree" "value 1" } } state Hide { Conditions { if LevelValue "Boss" != 5 goto ManageState } Actions { IgnoreWallSplines GotoNode "MaugrimHide" "run" } } state Patrol { Conditions { if LevelValue "Boss" != 2 goto ManageState if GotOpponent == 1 goto ApproachOpponent } Actions { #NoAttack false FollowPath } } #follow the opponent till we get in range state ApproachAttack { Conditions { if LevelValue "Boss" != 2 goto ManageState if GotOpponent == 0 goto Patrol if Timer > 0.5 goto Think } Actions { ResetTimer FollowOpponent } } state ApproachOpponent { Conditions { if LevelValue "Boss" != 2 goto ManageState if GotOpponent == 0 goto Patrol if BossOpponentRange < 4.0 goto AttackOpp } Actions { FollowOpponent } } state Think { Conditions { if LevelValue "Boss" != 2 goto ManageState if GotOpponent == 0 goto Patrol if BossOpponentRange > 3.0 goto ApproachOpponent if TurnAngAbs > 300.0 goto BackupTurn if Random < 0.7 goto AttackOpp if PreviousResult > 0.0 goto Wait } Actions { FaceOpponent "0.4" } } state Wait { Conditions { if LevelValue "Boss" != 2 goto ManageState if BossOpponentRange > 4.0 goto ApproachOpponent if TurnAngAbs > 300.0 goto BackupTurn } Actions { FaceOpponent "0.4" Setstate "Think" } } state AttackOpp { Conditions { if LevelValue "Boss" != 2 goto ManageState if TurnAngAbs > 300.0 goto BackupTurn if Timer > 1.0 goto Wait } Actions { ResetTimer PressActionButton #EngageOpponent "goalrange engagedist" "firerange shootrange" } } state BackupTurn { Conditions { if LevelValue "Boss" != 2 goto ManageState if GotOpponent == 0 goto Patrol if BossOpponentRange > 3.5 goto ApproachOpponent if TurnAngAbs < 256.0 goto Think } Actions { BackupTurn "goalrange 5.0f" } } state TakenHit { Conditions { if LevelValue "Slam" == 1 goto Slam } Actions { #FaceOpponent "1.0" #PressActionButton #Setstate "Think" Setstate "AttackOpp" } } state Slam { Conditions { } Actions { SetLevelValue "type Slam" "value 0.0" FaceOpponent "0.3" SetActionValue "value 5" "waitcontextfree" WaitActionFinished Idle "mintime 1.0" "maxtime 2.0" SetState "Think" } } state ManageState { Conditions { if LevelValue "Boss" == 1 goto Base if previousresult == 2 goto Patrol if previousresult == 3 goto RunToTree if previousresult == 4 goto LevelControlled if previousresult == 5 goto Hide } Actions { IgnoreWallSplines #CheckWallSplines } }