Jump to content
Sign in to follow this  
l337acc

Is there a way to detect if player views/mouses over a unit?

Recommended Posts

Google didn't come up with anything relevant that I can find. What I want to do is create a mission that is similar to the infantry showcase where the player needs to use a drone to spot a unit in order to complete an objective. I'm not sure how to go about this, but I would think that it can be accomplished by using that drone to lock onto a position of a unit for a given amount of time. Does anyone know how to do this?

Share this post


Link to post
Share on other sites

Thanks Dread. Would you know how I would use it in context? Say, spotting "enemy1" in a particular location? Is this correct:

 

if (cursortarget == enemy1) then {spotted = true};

 

Edit: That works!

Share this post


Link to post
Share on other sites

Thanks Dread. Would you know how I would use it in context? Say, spotting "enemy1" in a particular location? Is this correct:

 

if (cursortarget == enemy1) then {spotted = true};

 

Edit: That works!

Yup that's perfect, glad I could help

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  

×