#PARAM 1 shootrange 1.5 #PARAM 2 engagedist 1.5 PARAM 0 visibility 100 PARAM 1 shootrange 100.0 PARAM 2 engagedist 0.0 #start state state Base { Conditions { if LevelValue "Dwrf" != 0 goto GetToSlope } Actions { Disable DontPush #IgnoreWallSplines CheckWallSplines Respawnable "origin" SetHitPoints "default 3.0" NoAttack CanShootOffScreen NoLosCheck NoRingSeg } } state GetToSlope { Conditions { } Actions { Enable GotoLocator "xz_rangecheck" SetState "Idle" } } state Idle { Conditions { if LevelValue "Dwrf" != 1 goto ManageState if PlayerRangeP1 < 100.0 goto InBowRange if PlayerRangeP2 < 100.0 goto InBowRange } Actions { NoAttack "false" } } state InBowRange { Conditions { if Timer > 1.0 goto Think } Actions { ResetTimer PrimeBow } } state Think { Conditions { if Random < 0.7 goto AttackOpp if PreviousResult > 0.0 goto Wait } Actions { GetPlayerOpponent } } state Wait { Conditions { if GotOpponent == 0.0 goto Think } Actions { FaceOpponent "1.4" Setstate "AttackOpp" } } state AttackOpp { Conditions { if Timer > 1.0 goto Idle } Actions { ResetTimer EngageOpponent "goalrange engagedist" "firerange shootrange" } } state RespawnOff { Conditions { } Actions { Respawnable "false" NoAttack KillMe } } state ManageState { Conditions { if LevelValue "Dwrf" == 0 goto Base if LevelValue "Dwrf" == 2 goto RespawnOff } Actions { } } state Killed { COnditions { } Actions { SetLevelValue "type Dwrf" "value 0" } }