Jump to content
Sign in to follow this  
prototype1479

How to detect nearest player (5m between)

Recommended Posts

im making a mission where u have to survive take food to eat and then get out of the island . i also want a feature where u can pass food to someone. how can i detect the player then remove the action from yourself then add the action to the other guy?

Share this post


Link to post
Share on other sites

You're asking not just for the nearest player but for the whole system. I recommend to script one yourself because you'll understand how it works.

That said, instead of measuring distance you can attach action to the other unit and the game will measure distance and angle for you. This also solves the problem of action parameters.

Example

  • Like 1

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  

×