Module remoteplayer

Remote player related variables and functions

Functions

setmetadata (key, value) Sets a metadata with a specified key-value pair to the player.
getmetadata (key, defaultValue) Gets a player metadata value with the specified key.

Fields

team The current team the player is in.
health Player's current health.
rotation Player's current rotation in degrees.
speed Player's current speed stat.
jump Player's current jump stat.
accel Player's current acceleration stat.
x The absolute x-position of the player.
y The absolute y-position of the player.
outline The decimal color value of the player's outline.
outlinethickness The thickness of the outline.
paint The decimal color value of the player's dye.
alpha The opacity of the player.


Functions

setmetadata (key, value)
Sets a metadata with a specified key-value pair to the player.

Parameters:

  • key string Name of the metadata variable (the key)
  • value Value of the metadata variable

Usage:

    player.setmetadata("coins", 10)
getmetadata (key, defaultValue)
Gets a player metadata value with the specified key.

Parameters:

  • key string The key (metadata variable name) that's used to find its value.
  • defaultValue The value to return if the searched key does not exists. By default no specific value is returned.

Returns:

    Returns the key's value. Returns defaultValue instead if the key isn't found.

Usage:

    player.getmetadata("coins", 0)

Fields

team
The current team the player is in. Read-only. By default 'none'. Teammates can't directly hurt each other unless there are players left only in that team.
health
Player's current health. The player is killed if it goes to zero or below. Read-only.
rotation
Player's current rotation in degrees. Read-only. Rotation can only be set to values dividable by 90 degrees.
speed
Player's current speed stat. Read-only.
jump
Player's current jump stat. Read-only.
accel
Player's current acceleration stat. Read-only.
x
The absolute x-position of the player. Read-only.
y
The absolute y-position of the player. Read-only.
outline
The decimal color value of the player's outline. Set to a negative number to disable outline.
outlinethickness
The thickness of the outline. By default 10.
paint
The decimal color value of the player's dye. Set to a negative number to disable.
alpha
The opacity of the player. Ranges from 0 to 1. 0 means fully transparent, 1 means fully opaque. By default 1.
generated by LDoc 1.5.0 Last updated 2023-11-25 17:53:31