Player

Player

STD Library
Component
Combine:
Combatable
Scoreable
Rankable
Visibility
Buffable
Formulable

The in-game player entity. Each player has one.

Properties

Name Type Description Script Name
HP Int \ HP
Max. HP Int \ MaxHP
Is AI Bool Read Only
IsMonster
Player Status Player State Type Read Only Player
A player’s status: active, knocked down, or eliminated
PlayerStatus
Last Survival Time Int Read Only
LastSurvivalTime
Invincible Bool \ Invincible
Host Team Team Read Only Team
HostTeam
Current Checkpoint ID Int Checkpoint
LastCheckPointID
Target Checkpoint ID Int Checkpoint
TargetCheckpointID
Spawn point Direction point[Obsolete] Read Only Level Object
BornPosition_Deprecated
Revival point Direction point[Obsolete] \ RevivePosition_Deprecated
Faction (Droid Apocalyse) Int
Faction of the player. 1 = Human, 2 = Droid.
Faction_ForInfection
Weapon Damage Rate Float Combat
WeaponDamageRate
Character 3D model Human Model ID \ HumanModel
Movement Speed Scale Float \ RunSpeedScale
Jump Height Scale Float \ JumpHeightScale
Identity Int
Identity_ForInfection
The current zombie level Int
MonsterLevel
Direction point Direction point[Obsolete] Read Only
DirectPosition_Deprecated
Nickname String Read Only
Player Name
NickName
Damage Taken Percentage Float Combat
DamageTakenPercent
EP Int \ EP
Max. EP Int \ EPMAX
Main Weapon Weapon Read Only Items
MainWeapon
Is Drop on Eliminated Bool Items
IsDropOnEliminated
Whether eliminate upon knockdown Bool \ SkipKnockdown
Aim Assist Type Aim Assist Type Combat
AimAssistType
Allow Lock by Aim Assist Bool Combat
AllowLockbyAimAssist
Disable Voice Chat Bool Read Only Chat Channel
MuteVoiceChat
Disable Quick Chat Bool Read Only Chat Channel
MuteQuickChat
Chat Channel ChatChannel Read Only Chat Channel
ChatChannel
Movement status Player Behavior Status Type Read Only Player
MovementStatus_Deprecated
Sprint status Player Behavior Status Type Read Only Player
SprintStatus_Deprecated
Attack status Player Behavior Status Type Read Only Player
AttackStatus_Deprecated
Jump status Player Behavior Status Type Read Only Player
JumpStatus_Deprecated
Disable Item Pickup Bool Items
DisableItemPickup
Disable Item Drop Bool Items
DisableItemDrop
Attackable Targets Player List Read Only Team
AttackableTargets
Friendly Players Player List Read Only Team
FriendPlayers
Faction Faction Read Only Team
Faction
Number in Faction Int Read Only Team
Faction Serial No.
NumberInFaction
Main Camera Camera Camera
Camera used
MainCamera
Gravity Float \ Gravity
Helmet Helmet Read Only Items
The current helmet
Helmet
Vest Vest Read Only Items
The current vest
Vest
Crouch-Walk Speed Scale Float \ CrouchWalkSpeedScale
Sprint Speed Scale Float \ SprintSpeedScale
Downed Crawl Speed Scale Float \ DownedCrawlSpeedScale
Crawl Speed Scale Float \ CrawlSpeedScale
Head scale Vector3 \ HeadBonesScale_Deprecated
Body scale Vector3 \ BodyBonesScale_Deprecated
Limbs scale Vector3 \ LimbBonesScale_Deprecated
User UID UUID Read Only
UserUID
Headshot Damage Reduction Float Combat
HeadshotDamageReduction
Outfit Player Outfit Read Only Collection
The avatar used by the player
Outfit
Gender Gender Type Read Only Player
Gender
Gender
Weapon Skin IDs Read Only Collection
The player’s weapon skin
WeaponSkinIDs
Spawn Point Vector3 Read Only
The player’s spawnpoint
SpawnPoint
Revival Point Vector3 The revival point of a player. If there are no checkpoints, use a spawnpoint. Otherwise use checkpoints. RevivalPoint
Position Vector3 Read Only
Current position of the player
Position
Forward Vector3 Read Only
Current orientation of the player
Forward
Skeleton Skeleton Read Only Player
The pivot used to access the skeleton mask
Skeleton
Backpack Player Backpack Read Only Items
Player’s backpack
Backpack
Temporary Shield Points Int Temporary shield points TemporaryShieldPoints
Vehicle Skin ID Int List Read Only Collection
VehicleSkinIDs
Is Skip Stagger Animation Bool \ IsSkipStaggerAnimation
Is No Fall Damage Bool \ DisableFallDamage
Current Handheld Item entity Read Only
The current handheld
CurrentItemInHand
Item Pickup Banlist Item List The list of items that are not ground loot ItemPickupBanlist
Custom Character Resource Preset Character Type The player asset ID CustomCharacterResource
Ask Buy Target UI Request Purchase Type Economy
Specifies the target and sends purchase request
AskBuyTarget
Current Animation Resource Animation Clip ID Read Only
ID of the current emote clip
CurrentAnimationResource
Is Current Animation Loop Bool Read Only
Whether to set the current Emote animation to loop
IsCurrentAnimationLoop
Knockdown Status Knock-down Type Player
Settings for the response to the knockdown state when eliminated
KnockdownStatus
Show Damage Number Bool Player
True by default. Displays damage number.
ShowDamageNumber
Backpack Skin ID Int Read Only Collection
BackpackSkinID
Can Quit Midway Bool Read Only Client Side
CanQuitMdiway
Player Transform or NPC Outfit Read Only Collection
TransformClothInfo

Event

Name Description
On Equip Armor Triggered when equipping a helmet, body armor or backpack
On Equip Weapon Triggers when equipping a primary, secondary, or melee weapon, including when switching to fists
On Access Equipment Triggered when an item corresponding to a slot under the SwitchEquipSlot enumeration is obtained
On Switch Handheld Triggered when switching between held items, including switching to fists
On Be Knocked Down[Obsolete] Called when the player enters the knockdown kneeling position
On Be Knocked Down Triggered when the player enters a knockdown state
On Use Consumable Triggered after item is used. Items that have use duration will trigger this event after they are used.
On Access Item Triggered when an item is obtained
When player enters vehicle[Obsolete] Fires when an entity enters a vehicle, either as a driver or a passenger
On Enter Vehicle Triggered when an entity enters a vehicle, either as a driver or a passenger.
When player exits vehicle[Obsolete] Fires when an entity leaves a vehicle
On Leave Vehicle Fires when an entity leaves a vehicle.
When player drives vehicle[Obsolete] Triggered when the entity is driving a vehicle, and is the driver in the vehicle
On Drive Vehicle Triggered when the entity is driving a vehicle
After player is teleported[Obsolete] Fires after an entity uses a portal to teleport (deprecated, please use OnBouncesOffTire)
On Use Portal Fires after an entity uses a portal to teleport.
When player bounces off tire[Obsolete] Fired when an entity bounces
On Bounced By Tire Fires after an entity is bounced by a tire.
When player collides with trigger[Obsolete] Triggered when an entity is knocked away by a trap
On Hit Fly Triggered when an entity is knocked away by a trap.
On Revived Triggered when the player respwans
On Access Weapon Triggered when a weapon entity is obtained
On Player Switch Scene Triggered when the player switches scenes
On Drop Weapon Triggered when the player drops a weapon
On Drop Consumable Triggered when the player drops an item other than a weapon
On Aiming Triggered when targeting a Aimable entity.
On Disconnect Triggered when a player disconnects
On Reconnect Triggered when a player reconnects
On Attack Triggered when the player presses the fire button
On Jump Triggered when the player jumps
On Jump Stop Triggered when the player finishes jumping.
On Fall Triggered when the player falls
On Fall Stop Triggered when the player finishes falling.
On Crouch Triggered when the player crouches
On Prone Triggered when the player goes prone
On Sprint Triggered when the player sprints
On Throwable Explode Triggered when a projectile explodes after being thrown.
On Move Triggered when the player moves
On Idle Triggered when the player is idle
On Use Avatar Skill Triggered when the player uses a skill
On Stand Up Triggered when the player stands up from any other posture
On Surfing Triggered when the player uses a wakeboard
On Surfing Stop Triggered when the player stops using the wakeboard
On Sprint Stop Triggered when the player ends a sprint
On Friendship Status Update Triggered when a player adds or deletes a friend
On Plot Start Triggers when the plot starts to play
On Plot End Triggers when the plot ends
On Trigger Plot Option Triggers when an option is selected in the plot

API

Name Description
Add Item Add items to the player and return the list of items issued
Set Special Item Status Set the special item status for the player. Special items can only have one
Add HP Restore health to the designated player without exceeding the health limit
Destroy Item Delete a certain number of items from the player
Get Item Count Get the number of specified items held by the player
Create Built In UI Create a built-in UI that only the specified player can see
Create Icon[Obsolete] Create an icon using the specified icon type. If there are more properties to set, further set its entity properties through the entity (deprecated, please use CreateLevelObject)
Create text[Obsolete] Create a text with the specified text content. If there are more properties to be set, further set its entity properties through the entity (deprecated, please use CreateLevelObject)
Create visual effects[Obsolete] Create an icon using the specified effect type. If there are more properties to set, further set its entity properties through the entity (deprecated, please use CreateEffect)
Create visual effects[Obsolete] Create an icon using the specified special effect type. If there are more properties that need to be set, further set its entity properties through the entity.
Create Custom UI Create a custom UI that only the specified player can see
Get Widget From Custom UI Get UI widget from custom UI
Play sound effect[Obsolete] Play the specified sound effect. If there are more properties to set, further set its entity properties through the entity (deprecated, please use CreateSound)
Notify Play Sound Notify the target player’s client to play the sound effect
Notify Show Tips Notify the target player’s client to display Pop-up text
Teleport[Obsolete] Teleport player to specific coordinates (deprecated, use Teleport)
Obtain nearby teammates’ locations[Obsolete] Gets the position near teammates, will circumvent the position of players who can’t stand (deprecated, please use GetTeammateNearPosition)
Get Position Near Teammate Get the position of a random teammate. If there are no teammates, return the coordinates near yourself. Avoid the position of players who are unable to stand.
Get random spawn coordinates[Obsolete] Get the available coordinates of the random spawn point that is currently available but not fully occupied (deprecated, please use GetRandomSpawnPosition)
Get player score[Obsolete] Get the total score of the player’s specified score type
Set player’s round score[Obsolete] Set the round score of the player’s specified scoring type
Obtain player round score[Obsolete] Get the player’s score for a specified round and point type
Get Player Rank[Obsolete] Get the player’s overall game ranking
Get Player Round Rank[Obsolete] Get the player’s ranking in a specified round
Get Random Spawn Position Get the coordinates of a random spawn point, which will only be randomly selected from available spawn points that are not fully occupied
Check Trigger By Order Checks whether the player can trigger the current checkpoint
Revive Resurrecting a Designated Player
Switch Weapon Switch the player’s weapon to the weapon in the specified slot
Destroy player item[Obsolete] Destroys player items (deprecated, use DeleteEquipment)
Destroy Equipment Destroys the weapon in the player’s specified slot
Create Wallet Create a wallet for the target player. Ineffective if the player already has a wallet.
Get Current Chat Channel Get the chat channel entity that the specified player is currently in
Join Chat Channel Makes the player join the specified chat channel. If the player is already in another chat channel, it will switch to the target channel.
Quit Chat Channel Make the player exit the current channel and then be in a state of not being in any chat channel
Set Behavior Status Set the player’s behavior state
Switch Area Switch the player to the specified location of the specified scene. Unloaded scenes will be automatically loaded, and loaded scenes will not be automatically unloaded.
Set Jersey Change jersey
Reset Jersey Restore the player’s jersey to its original state
Set Player Voice Status Toggle player voice chat
Set Player Quick Message Status Toggle player quick chat
Morph To Replace the target player’s appearance with the appearance of the specified scene object
Play Character Animation Clip Play character animations, support custom animation resources
Play Character Animation Clip Override Play a character animation clip with the option to override the game’s default animation
Set Character Sets the character resource of the specified player
End Morph Cancel the player’s disguise status
Copy To Morph Create a clone with the appearance of scene entity at the position of the target player
Get Morph Get the player’s disguise entity
Get Widget By Path Get a UI widget from a custom UI using a path
Set Pickup Status Sets whether the target player can pick up items
Set Drop Status Set whether the target player can drop items
Player attack setting[Obsolete] Set attackable players
Get attackable player[Obsolete] Deprecated
Get Current Camera Get the camera entity currently used by the target player
Switch Camera Switching the target player’s camera to the target camera
Clear Backpack Clear all items in the target player’s backpack, including equipped items
Set Forward Set the player’s direction
Set Skills Set the target player’s skill list
Get Skills Get the target player’s skill list
Get Consumables Get the consumables in the target player’s backpack consumable column
Add Attachments Add an accessory to the weapon in the specified slot. Accessory that does not match the slot will fail to be added; matching but duplicate accessory will replace the original accessory, and the original accessory will be sent to the player’s backpack. If
Get Equipments Get the equipment in the backpack equipment column
Upload battle result[Obsolete] abandoned
Quit Game Kick the target player out of the game
Skeleton scale[Obsolete] (Obsolete, do not use, see the property :Skeleton for related information)
Set Player Can Quit Midway Set whether the player can exit freely
Hit Fly Give the player a knock-up effect. The target player will fall at a fixed acceleration, and will be forced to stop after a collision in the air.
Reset Outfit Restore the target player’s default clothing. Does not work on NPCs.
Reset Weapon Skin Restores the target player’s default weapon skin. Does not work on NPC
Set Bundle Set the player’s outfit
Set Default UI Status Set the target player’s default interface visibility
Create Mini Map Icon Creating a Minimap Icon
Create Mini Map Pixel Create a static pixel on the map for the target object. The static pixel will not move with the target object.
Get Mini Map Get the target player’s minimap entity
Use Skill Target AI releases certain skill
Get Vehicle Skin Get the target player’s vehicle skin
Set Vehicle Skin Set the target player’s vehicle skin
Remove Vehicle Skin Clear the skin of the target player’s specified vehicle
Reset Vehicle Skin Restore the target player’s default vehicle skin
Enter Vehicle Forces the target player to enter the specified vehicle
Request Match Making The target player requests to match the specified map
Create Sound Effect[Obsolete] Play the specified sound effect. If there are more properties that need to be set, further set its entity properties through the entity.
Set Falling Damage Set the player’s fall damage, and set different damage according to the height segment
Destroy Bot Destroy the specified Bot
Exit Vehicle Force the targeted player to leave the vehicle
Drop Item Make the target player drop an item
Upload Game Result Upload custom settlement information
Create Sound Play the specified sound effect. If there are more properties that need to be set, you can set its entity properties.
Create Effect Create a specified visual effect. If there are more properties that need to be set, you can set its entity properties.
Reset Backpack Skin Restore the target player’s backpack skin to the default out-of-game configuration
Is Friend Determine the friend relationship between the target player and the current client player. The current client itself is not a friend of the current client.
Start Parachute Start parachuting
Add AOI Special Follow Added AOI special attention, always synchronized regardless of distance
Remove AOI Special Follow Remove AOI special attention and cancel AOI synchronization outside line of sight
Has AOI Special Follow Determine whether there is AOI of special concern
Switch AOI Proxy Observer Toggle the player’s proxy observer
Notify Start Plot Start playing the specified plot for the triggering player