Players
Positions are in tile space. To get the center of a tile add 0.5
Net.list_players(area_id)
Returns a list of player_id
s.
Net.is_player(player_id)
Returns true if the server is aware of a player with the provided id.
Net.get_player_area(player_id)
Returns the area_id
for the area the player is currently in.
Net.get_player_ip(player_id)
Returns the IP address of the player as a string. Useful for creating connection whitelists/blacklists.
If you want to track data use Net.get_player_secret(). Otherwise you'll have issues when multiple players live within the same house.
Net.get_player_name(player_id)
Returns the name of the player. "Nickname" in config.
Net.set_player_name(player_id, name)
Sets the name of the player for all players to see.
Net.get_player_direction(player_id)
Returns the facing direction of the player.
Net.get_player_position(player_id)
Returns Net.Position