Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
T-Max

Trace position between two players

Recommended Posts

Hi everybody!

=DayZ=

I create script which shows nickname of all player near me at 10 metres.

That script works for all players and I encountered a problem. Script also shows nicknames through walls - like wallhack. I need a function which can trace position from first player's position to second player's position and return true when trace has been successful( without hit any wall ) and return false otherwise.

Thanks!

T-Max

Share this post


Link to post
Share on other sites

Well I think your question is better suited to be in the Editing & Scripting Subforum, but nevertheless here's your answer:

You can use lineIntersects to check if there are objects between the player and your position.

If you want to find out if there are specific objects between the both of you, use lineIntersectsWith and cycle through the returning array and check the type using isKindOf.

Share this post


Link to post
Share on other sites

XxAnimusxX, thanks a lot. lineIntersects is what i need. ^.^

Share this post


Link to post
Share on other sites
Sign in to follow this  

×