Player
The 'Player' class in Highrise represents each individual participant in the game. It is a crucial element, acting as the bridge between the player's real-world actions and their in-game avatar's behaviors.
Properties
Event fired when the player's character changes. This is called when player.character is set to a new object and not when the character's outfit changes. Event Parameters: Player: the player whose character object changed New Character: the new character object Old Character: the previous character object, if it exists
Event fired when the player's pet changes, either by changing to a different pet or changing the accessories equipped to the current pet. Event Parameters: Player: the player whose pet changed Outfit: the new outfit of the pet
Event fired when the player starts talking in a voice channel. Event Parameters: Player: the player who started speaking
Event fired when the player stops talking in a voice channel. Event Parameters: Player: the player who stopped speaking
The chat channel the player is currently active in.
The character that represents this player in the world. It allows you to manipulate the character's properties and behavior, such as changing its appearance or controlling its movement. Only server scripts can set the character.
The transform where chat bubbles are spawned. It can be used to position objects above a character's head.
Returns true if the player has a pet, false otherwise.
An identifier for the player's current connection to the world. If the player leaves and joins the same world instance or a different one this value will change. For a unique identifier for the player that will not change, use player.user.Id.
True if the player is above the age of 18, false otherwise.
True if the player has left the world, false otherwise. If the player rejoins the world, a new Player object will be created, so this value will not change after the player has left. Use this instead of comparing to nil when checking if a Player object is valid.
True if this player has moderation rights in this world instance. If this world instance is an owned room, it will be true for the room owner and any moderators they have added. For world instances that are not owned rooms, it is true for the world owner and any members of the world.
Returns whether the player is currently speaking in a voice channel.
Whether this player has an active subscription to Highrise+.
The name of the player. This can be used to identify the player in the game in the chat or in the leaderboard, for example.
Contains information about the player's current pet, nil if the player does not have a pet.
The user associated with the player.
When proximity chat is enabled, voice position is the position used for this player when calculating voice volume. If this is not set, the character's position is used.
If this player is speaking, this returns the volume of their voice on a scale from 0-1.
Methods
Returns whether the player is currently using a pet of the specified type. This type matches the value returned by player.pet.skeletonId.
Parameters
petId
Returns
Returns true if the pet type matches, otherwise false.
Updated 7 days ago