//MosEisley_D state Base { Conditions { if Random < 0.3 goto ChooseNewLocator if AlwaysTrue == 1 goto Waiting } Actions { GetLocatorFromGroup "name=Patrol" "random" CanSeeBehind "FALSE" SetViewDistance "2" } } state Waiting { Conditions { if Timer > 20 goto ChooseNewLocator if GotOpponent == 1 goto Engage } Actions { ResetTimer "mintime=0" "maxtime=5" Idle } } state ChooseNewLocator { Conditions { if GotOpponent == 1 goto Engage } Actions { GetLocatorFromGroup "name=Patrol" "next" SetState GoToLocator } } state GoToLocator { Conditions { if GotOpponent == 1 goto Engage } Actions { GoToLocator "Walk" SetState "Waiting" } } state Engage { Conditions { if GotOpponent == 0 and if Timer > 20 goto GoToLocator } Actions { EngageOpponent "goalrange 1.5" "firerange=3" } }