Field
Last updated
Last updated
These are the attribute values pertaining to players.
The player’s nickname (name), location (tileX / tileY), etc. can be viewed. The player’s spotlight (spotlight) feature and hide (hidden) feature can be activated. The player’s movement speed (moveSpeed) and image (sprite) can be adjusted. It’s also possible to utilize the Space's storage (storage) for storing player values.
🔒 Fields with this icon are read-only fields that cannot be revised.
Name | Description |
---|---|
player.id: Number player.name: String
Calls the player ID and nickname values.
Example
Make the player’s ID and nickname value display when a player enters.
player.title: String
Title is a yellow text that displays above the avatar’s nickname.
Example
Set up a title for a player when they enter.
player.role: Number
Role is the player’s permission roles’ number value.
The following values will be displayed depending on the player’s role.
Example
Display the permission role value in the chat screen.
player.tileX: Number player.tileY: Number
The x axis value and y axis value of where the player’s avatar is standing.
Example
Display my avatar’s x and y coordinates.
player.dir: Number
The direction the player’s avatar is looking.
The following values are displayed depending on the direction the avatar is looking.
Example
Display the value of where the avatar is looking.
player.moveSpeed: Number
This is the player’s movement speed value. (Default Value: 80)
If the movement speed value is 0, the player cannot move.
Example
Increase the movement speed when q is pressed.
player.sprite: ScriptDynamicResource
A sprite image of the player’s avatar. (Resets to the default avatar image when inputting null)
Check the Understanding Sprite Sheets page if it’s your first time hearing about sprite images.
Example
Apply the Paintman-Blueman image as the avatar image.
player.tag: Any
Give necessary attribute values to a player by using tag.
Example
Give a player the ‘alive’ attribute value. The ‘alive’ attribute value is a deliberately created attribute.
If the attribute is unused, it won’t be a useful attribute value. In this case, the "alive" attribute value can check if a player has been eliminated from a game or not.
player.hidden: Boolean
If the hidden attribute value is true, the corresponding player is not visible to other players.
The avatar in a hidden state is not visible, but it is possible to connect the video and audio.
Example
Give an avatar the hidden attribute to make the avatar not visible to other players.
player.spotlight: Boolean
This activates or deactivates the player’s spotlight feature.
Example
Make a function that turns the spotlight feature ON or OFF by pressing q.
player.disableVideo: Boolean player.disableAudio: Boolean
This activates or deactivates the player’s video/audio features.
Example
Display in the chat screen if the video and/or audio are deactivated or not.
player.attackType: Number
This is a player’s attack type performed by pressing z. (default value: 0)
Example
Change the avatar’s attackType.
player.attackParam1: Number
This is an attribute for the attack image’s distance range shown when pressing z. The attack’s possible distance range does not increase.
Example
Change the attackParam1.
player.attackParam2: Number
This is an attribute for distance available for attack. This is only valid when attackType is set to a ranged attack.
Example
Set a ranged attack using attackParam2.
player.attackSprite: ScriptDynamicResource
This is an attribute for the attack image shown when pressing z.
Example
Apply the boxing game’s glove attack image.
player.walletAddress: String
This is the player’s wallet address.
Example
Call the wallet address. If there is no wallet address, the results called will be null.
player.storage: String
This is the storage space for the player value within the space. (Limited to the Space)
Example
Store the data in player storage and check it.
Even after closing the app and restarting it, the stored values will not disappear.
player.isMobile : Boolean
This displays whether the player is connected via mobile in true or false.
Example
Display mobile PC status in the entry message when a player enters.
player.isMoving : Boolean
If the player is moving, this function returns True. If not, this returns False.
Example
Detect the player's movement and display a message.
player.isJumping : Boolean
If the player is jumping, this function returns True. If not, this returns False.
Example
Detect the player's movement and display a message.
player.customData : String
This field saves the value received as a query string.
Example
player.displayRatio
This function zooms the player's display in or out. (Default Value: 1)
Example
Create a key to zoom in or out.
player.titleColor
This function can read and change the player title's color.
You can enter enum values or hex code values.
Example
Change the title color.
player.emailHash
This function reads the hash value of the player's email.
Example
Display the hash value of a player.
player.isGuest
If the player is not signed in, this function returns True.
Example
Show "GUEST" as a title when a guest who is not signed in enters.
Role | Number | Role | Number |
---|---|---|---|
Direction | Number | Direction | Number |
---|---|---|---|
attackType | Description |
---|---|
🔒 id
Player ID value
name
Player Nickname value
title
Text to be displayed in yellow above an avatar’s nickname
🔒 role
A numerical value that represents a player’s permissions
🔒 tileX / tileY
The X and Y coordinate values where the avatar is standing
🔒 dir
A value representing the direction a player is looking
moveSpeed
A value representing the player’s movement speed
sprite
An avatar’s sprite image value
tag
Value storage space to assign required attribute values
hidden
If the value is set to true, the player is invisible
spotlight
Toggle player spotlight
🔒 disableVideo
Toggle player video
🔒 disableAudio
Toggle player audio
attackType
Player’s attack type when z is pressed
attackSprite
Player’s attack image value when z is pressed
attackParam1
Distance value that affects how far the attack image flies
attackParam2
Distance value available for attack
Only valid when attackType
is set to 2 (ranged attack)
🔒 walletAddress
The player’s wallet address value
storage
Storage space for player values in the Space (limited to the Space)
🔒 isMobile
Whether the player is connected via mobile
🔒 isMoving
If the player is moving, returns True. If not, returns False
🔒 isJumping
If the player is jumping, returns True. If not, returns False
customData
Can read the URL query string and save the value
displayRatio
Zoom in or out player's display
titleColor
Player's title color
🔒 emailHash
The hash value of the player's email
🔒 isGuest
If the player is not signed in, returns True.
Guest
-1
Staff
2000
Member
0
Admin
3000
Editor
1000
Owner
3001
Left
1
Top-Left
5
Up
2
Bottom-Left
6
Right
3
Top-Right
7
Down
4
Bottom-Right
8
0
If the attackType is not set up, it means it is set to the default attack type.