PARAM 0 visibility 20 PARAM 1 shootrange 3.5 PARAM 2 engagedist 3.0 #start state state Base { Conditions { if Message "Wolves2" == 1 and if Timer > 2.0 goto GetToSlope } Actions { ResetTimer NoLosCheck IgnoreWallSplines CheckWallSplines DontPush Respawnable "origin" SetLevelValue "type wolf" "value 0" } } state GetToSlope { Conditions { if CreatureFireDist < 2.4 goto FireBlocking if LocatorRangeXZ < 0.4 goto Patrol } Actions { Enable GotoLocator "xz_rangecheck" } } state FireBlocking { Conditions { } Actions { SetLevelValue "type wolf" "value 1" } } state Patrol { Conditions { if GotOpponent == 1 goto ApproachOpponent } Actions { FollowPath } } #follow the opponent till we get in range state ApproachOpponent { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange < 3.0 goto AttackOpp } Actions { FollowAttack } } state ApproachAttack { Conditions { if GotOpponent == 0 goto Patrol if Timer > 0.5 goto Think } Actions { ResetTimer FollowAttack } } state Think { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange > 3.5 goto ApproachOpponent if Random < 0.6 goto AttackOpp if PreviousResult > 0.0 goto Wait } Actions { FaceOpponent "0.6" } } state Wait { Conditions { if OpponentRange > 3.5 goto ApproachOpponent } Actions { FaceOpponent "0.6" Setstate "Think" } } state AttackOpp { Conditions { if Timer > 1.0 goto Wait } Actions { ResetTimer EngageOpponent "goalrange engagedist" "firerange shootrange" } }