Findplayer: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
New page: findplayer <dist> Finds the nearest player and calculates the distance(<dist>) to him/her.<br\> The RETURN variable is ID(0..max players) of the found player. [[Category:EDuke comman...
 
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
findplayer <dist>
'''findplayer''' <[[gamevar]]><br>
'''findotherplayer''' <[[gamevar]]>


Finds the nearest player and calculates the distance(<dist>) to him/her.<br\>
Returns the distance and ID of the nearest player.  Parameter taken is the [[gamevar]] to return the distance to, while [[RETURN]] holds the ID of the player found. Note that if run from the APLAYER actor or from a player event, '''findotherplayer''' must be used, as '''findplayer''' will return the ID of the player which called it.
The [[RETURN]] variable is ID(0..max players) of the found player.


[[Category:EDuke commands]]
[[Category:EDuke commands]]
[[Category:Gamevar manipulation]]
[[Category:Player manipulation]]

Latest revision as of 21:05, 7 January 2011

findplayer <gamevar>
findotherplayer <gamevar>

Returns the distance and ID of the nearest player. Parameter taken is the gamevar to return the distance to, while RETURN holds the ID of the player found. Note that if run from the APLAYER actor or from a player event, findotherplayer must be used, as findplayer will return the ID of the player which called it.