The player controls this entity.
Readonly
clientThe client transfer data provided with the request that transferred the player to this server. This is available on both the client and the server, but is not available to non-local clients.
Readonly
connectionUnique network connection ID for the player in the given server. This ID is typically given to network requests as a way to identify the player to/from the server.
This is not a unique identifier for the player outside of the server and will not persist. For a completely unique ID, use userId.
Readonly
onFired on both client and server when player changes team.
Readonly
onFired when the player's character changes.
Readonly
onFired when the player disconnects from the server. Connections will automatically be disconnected when the player leaves.
Readonly
orgThe name of the role in the game's organization. This will be undefined if they are not a member of the organization.
WARNING: not implemented yet. only returns local platform for now.
Image id used to fetch player's profile picture.
The player's selected outfit.
OutfitDto's can be passed to Character.LoadUserOutfit()
Readonly
serverThe server only transfer data provided with the request that transfered the player to this server. This is not available on the client.
Readonly
teamThe player's current team.
You can add players to teams by using team.AddPlayer(player)
Use Airship.Teams to get references to a team.
Readonly
userThe player's unique ID. This is unique and unchanging per player.
String length is <= 128 characters (but will likely be far shorter -- typically 28 characters).
Readonly
usernameThe player's username. This should be used for display. Username can change, so to save a player's data use userId.
Readonly
voiceAudio source for player's voice chat. Attached to a Game Object that can be reparented to control voice chat position. By default this lives under the player's character and is muted for the local player.
Allows the server to perform a lag compensated check against the clients view of the world at the current server tick.
This function should be used to perform read only checks against the clients view of the world. For example, perform a raycast to check if the player actually hit another player.
This function should be used to perform actions based on the result of your check and will run against the current real view of the world as the server sees it. Use this function to apply damage or move the player.
Returns immediately after scheduling the lag compensation check. The check and complete functions will be called later.
Can yield if the player's outfit hasn't finished downloading.
Spawn position of character
Optional
config: { Optional
customOptional
lookInitial facing direction of character
The player object represents a client connected to your Airship game server (or a bot player if spawned).