The Player Detector is able to recognize players within a certain range. In addition, it recognizes the player who clicks on him.
|Event Name||Parameter One||Parameter Two||Description|
|playerClick||"playerClick"||string username||Fires when a player clicks on the block.|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|getPlayersInRange(int range)||table||Return players within a certain range.|
|getPlayerPos(string player)||table||Returns player's position.|
|isPlayerInRange(int range, string username)||boolean||Returns true if the player is in range, false if not.|
|isPlayersInRange(int range)||boolean||Returns true if any player is in range, false if not.|
The center of the range is the Player Detector itself and not the Computer.
The player detector was also a buggy block, like the energy detector. But it was not too buggy. We had bugs that the block uses completely wrong coordinates or the range was broken.
0.4.2b Added a max range config value.
0.3b Added the functions isPlayersInRange and isPlayerinRange.
0.2.6b Added the function getPlayersInRange.
0.1b Added the player detector, it was the third feature of the mod.