Well of course im talking about a certain situation. Im a mission maker
. actually i think the designer letting the AI run free too much is irresponsible. I like to keep a balance between scripted scenes/controled enemies and free AI.
What I was thinking of doing is for the AI spinning to face the player. making a script that gets the direction heading to the player. and then setdirs him incrementally by loop that changes his direction by 1 degree each loop. a quick test with my own (out of shape) body seems like half a second to turn 180 degrees seems pretty good. so that makes 1 degree every .003 seconds. for less lag maybe go by 5 degrees each .01 seconds. so, i just change his direction by 5 degrees every .01 seconds until he is facing the player.
so maybe i could do it like
_unit = _this select 0
@_unit distance player < 4
@_unit knowsabout player > .7
_direction = getdir _unit
*insert trg here which creates new variable _bearing*
?(_bearing-_direction) <|10| or ?(_bearing - _direction)>|350|:exit
#loop
?(_direction - _bearing) <10:exit
_direction = (_direction - 5)
?_direction < 0:_direction = (_direction + 360)
_unit setdir _direction
~.01
goto "loop"
woow thats a mess, haha, this is just a rough idea i know if this way the unit could end up turning the wrong way and its full of errors.