Jump to content
Sign in to follow this  
Undeceived

How to check if the AI sees the player?

Recommended Posts

Hi guys,

is it possible to know if the AI actually sees another unit (e.g. the player)? I'm not talking about knowsabout and the trigger option "detected by ...".

What I mean is that there is a moment where the AI switches to raise the gun if it sees an enemy. Knowsabout can be at max already but the AI still will do what it is told normally. Until it really sees an enemy. Then it will raise its gun and fire.

And I want to know if it is possible to know if this is happening.

I would use this information for something like this:

if ((AIenemyunit [b]sees [/b]player) AND (playerIsArmed)) then {player setcaptive false;};

Do you have any idea? :D

EDIT:

In case someone finds this thread, looking for the answer: -----> Line Of Sight --> http://forums.bistudio.com/showthread.php?135252-Line-Of-Sight-%28Example-Thread%29

Edited by Undeceived

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×