how do you check in a script if a unit is looking at another unit, like the same thing they use to make an AI target sombody else.
so like if unit1 knows about unit2 and then unit2 ran behind a house then if the script checked at that moment it would return false but if unit2 ran back out into unit1s view then it would return true. does anything like that exist.
nevermind i solved that part but i have another problem,
i made a script that has an AI man wait until he knows about the player and the if the players distance is less the 35m he will run over to the players position, i tried it with the player being friendly to the AI and it works perfect, but when i tried to do it as the enemy(what it was intended for) and pop out around a corner into the AIs view and then go back around the corner so he couldnt shoot me he just stands there looking for me, he dosent run around the corner to my position? i dont know whats wrong.
here it is.
_unit = _this select 0
#check1
?_unit knowsabout player > .2:goto"check2"
~.5
goto"check1"
#check2
_dist = _unit distance player
?_dist < 35: goto"next"
~.5
goto "check2"
#next
_unit setbehaviour"combat"
_unit setunitpos"UP"
_unit domove [(getpos player select 0)+5,(getpos player select 1)+0,getpos player select 2]
exit
thanks