Player

Player

STD Library
Componente
Combinar:
Combatable
Scoreable
Rankable
Visibility
Buffable
Formulable

In-game player entities, one per user

Propiedades

Nombre Tipo Descripción Nombre del script
HP Int Player’s current blood level HP
Max. HP Int Player’s current blood maximum MaxHP
Is AI Bool Solo lectura
Determine the current player is AI player, AI is usually NPC or PVE monster
IsMonster
Player Status Player State Type Solo lectura Player
Player Status
PlayerStatus
Last Survival Time Int Solo lectura
The player’s survival time, if the player dies, the time will be recalculated.
LastSurvivalTime
Invincible Bool Player’s invincibility Invincible
Host Team Team Solo lectura Team
The entity of the team the player belongs to
HostTeam
Current Checkpoint ID Int Checkpoint
Current checkpoint ID
LastCheckPointID
Target Checkpoint ID Int Checkpoint
ID of the checkpoint the target is traveling to
TargetCheckpointID
Spawn point Direction point[Obsoleto] Solo lectura Level Object
(Deprecated, please do not use)
BornPosition_Deprecated
Revival point Direction point[Obsoleto] (Deprecated, please do not use) RevivePosition_Deprecated
Faction (Droid Apocalyse) Int
The player’s camp
Faction_ForInfection
Weapon Damage Rate Float Combat
The player’s damage multiplier, e.g. 2x configured as 2.0
WeaponDamageRate
Character 3D model Human Model ID Use the exact same rig as the male or female character, 0 means no model replacement HumanModel
Movement Speed Scale Float Does not conflict with existing velocity scaling RunSpeedScale
Jump Height Scale Float Does not conflict with existing jump height scaling JumpHeightScale
Identity Int
Identity,0 Normal Player,1 Hunter,2 Matrix Zombie,3 Normal Zombie,4 Evolved Zombie Type 1, 5 Evolved Zombie Type 2,6 Evolved Zombie Type 3
Identity_ForInfection
The current zombie level Int
Zombie level, 1~3
MonsterLevel
Direction point Direction point[Obsoleto] Solo lectura
(Deprecated, please do not use)
DirectPosition_Deprecated
Nickname String Solo lectura
Player’s nickname
NickName
Damage Taken Percentage Float Combat
Percentage of damage dealt when taking damage, can be reduced or increased
DamageTakenPercent
EP Int Player’s current EP EP
Max. EP Int Player’s maximum EP EPMAX
Main Weapon Weapon Solo lectura Items
Primary weapon currently in hand.
MainWeapon
Is Drop on Eliminated Bool Items
Is Drop on Eliminated
IsDropOnEliminated
Whether eliminate upon knockdown Bool (Deprecated, please do not use) SkipKnockdown
Aim Assist Type Aim Assist Type Combat
Aim Assist Type
AimAssistType
Allow Lock by Aim Assist Bool Combat
Allow Lock by Aim Assist
AllowLockByAimAssist
Disable Voice Chat Bool Solo lectura Chat Channel
Switch voice chat on/off: true to turn off voice, false to turn on voice
MuteVoiceChat
Disable Quick Chat Bool Solo lectura Chat Channel
Switch quick chat: trueClose voice, falseOpen voice
MuteQuickChat
Chat Channel ChatChannel Solo lectura Chat Channel
Channel
ChatChannel
Movement status Player Behavior Status Type Solo lectura Player
(Deprecated, please do not use)
MovementStatus_Deprecated
Sprint status Player Behavior Status Type Solo lectura Player
(Deprecated, please do not use)
SprintStatus_Deprecated
Attack status Player Behavior Status Type Solo lectura Player
(Deprecated, please do not use)
AttackStatus_Deprecated
Jump status Player Behavior Status Type Solo lectura Player
(Deprecated, please do not use)
JumpStatus_Deprecated
Disable Item Pickup Bool Items
Switch pickup: trueCan’t pickup, falseCan pickup
DisableItemPickup
Disable Item Drop Bool Items
Toggle Discard Item: trueCan’t discard, falseCan discard
DisableItemDrop
Attackable Targets Player List Solo lectura Team
Attackable Targets
AttackableTargets
Friendly Players Player List Solo lectura Team
Friendly Players
FriendPlayers
Faction Faction Solo lectura Team
Faction
Faction
Number in Faction Int Solo lectura Team
Number in Faction
NumberInFaction
Main Camera Camera Camera
Camera the player is using
MainCamera
Gravity Float Custom Gravity Gravity
Helmet Helmet Solo lectura Items
Helmet
Helmet
Vest Vest Solo lectura Items
Vest
Vest
Crouch-Walk Speed Scale Float Does not conflict with existing velocity scaling CrouchWalkSpeedScale
Sprint Speed Scale Float Does not conflict with existing velocity scaling SprintSpeedScale
Downed Crawl Speed Scale Float Does not conflict with existing velocity scaling DownedCrawlSpeedScale
Crawl Speed Scale Float Does not conflict with existing velocity scaling CrawlSpeedScale
Head scale Vector3 (Deprecated, please do not use) HeadBonesScale_Deprecated
Body scale Vector3 (Deprecated, please do not use) BodyBonesScale_Deprecated
Limbs scale Vector3 (Deprecated, please do not use) LimbBonesScale_Deprecated
User UID UUID Solo lectura
User UID
UserUID
Headshot Damage Reduction Float Combat
Headshot Damage Reduction
HeadshotDamageReduction
Outfit Player Outfit Solo lectura Collection
AVATAR the player is bound to
Outfit
Gender Gender Type Solo lectura Player
Gender
Gender
Weapon Skin IDs Solo lectura Collection
Weapon Skin IDs
WeaponSkinIDs
Spawn Point Vector3 Solo lectura
Player’s spwan point
SpawnPoint
Revival Point Vector3 Player’s resurrection point, if no checkpoints are recorded then the spwan point is used, otherwise checkpoints are used RevivalPoint
Position Vector3 Solo lectura
Player’s current position
Position
Forward Vector3 Solo lectura
The player’s current orientation
Forward
Skeleton Skeleton Solo lectura Player
The node used to access the skinned rigs
Skeleton
Backpack Player Backpack Solo lectura Items
Backpack
Backpack
Temporary Shield Points Int Temporary Shield Points TemporaryShieldPoints
Vehicle Skin ID Int List Solo lectura Collection
Vehicle Skin ID
VehicleSkinIDs
Is Skip Stagger Animation Bool Is Skip Stagger Animation IsSkipStaggerAnimation
Is No Fall Damage Bool Is No Fall Damage DisableFallDamage
Current Handheld Item entity Solo lectura
Current Handheld Item
CurrentItemInHand
Item Pickup Banlist Item List Item Pickup Banlist ItemPickupBanlist
Custom Character Resource Preset Character Type Player’s resource ID CustomCharacterResource
Ask Buy Target UI Request Purchase Type Economy
The target to which the Request Purchase message was sent
AskBuyTarget
Current Animation Resource Animation Clip ID Solo lectura
The resource ID of the currently playing Emote
CurrentAnimationResource
Is Current Animation Loop Bool Solo lectura
Whether the currently playing Emote is looping or not
IsCurrentAnimationLoop
Knockdown Status Knock-down Type Player
Handling of knockdown status
KnockdownStatus
Show Damage Number Bool Player
Whether to enable damage skipping, the default is True, which means it’s enabled.
ShowDamageNumber
Backpack Skin ID Int Solo lectura Collection
Backpack Skin ID
BackpackSkinID
Can Quit Midway Bool Solo lectura Lado del cliente
Whether to quit in the middle of the game
CanQuitMdiway
Player Transform or NPC Outfit Solo lectura Collection
Clothing information to be kept when the player transforms into another character
TransformClothInfo
Custom Camera Custom Camera Camera
T_49_META_TYP_14_I78_D
CustomCamera

Event

Nombre Descripción
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[Obsoleto] 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[Obsoleto] 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[Obsoleto] Fires when an entity leaves a vehicle
On Leave Vehicle Fires when an entity leaves a vehicle.
When player drives vehicle[Obsoleto] 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[Obsoleto] 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[Obsoleto] Fired when an entity bounces
On Bounced By Tire Fires after an entity is bounced by a tire.
When player collides with trigger[Obsoleto] 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

Nombre Descripción
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[Obsoleto] 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[Obsoleto] 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[Obsoleto] 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[Obsoleto] 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[Obsoleto] 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[Obsoleto] Teleport player to specific coordinates (deprecated, use Teleport)
Obtain nearby teammates’ locations[Obsoleto] 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[Obsoleto] Get the available coordinates of the random spawn point that is currently available but not fully occupied (deprecated, please use GetRandomSpawnPosition)
Get player score[Obsoleto] Get the total score of the player’s specified score type
Set player’s round score[Obsoleto] Set the round score of the player’s specified scoring type
Obtain player round score[Obsoleto] Get the player’s score for a specified round and point type
Get Player Rank[Obsoleto] Get the player’s overall game ranking
Get Player Round Rank[Obsoleto] 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[Obsoleto] 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[Obsoleto] Set attackable players
Get attackable player[Obsoleto] 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[Obsoleto] abandoned
Quit Game Kick the target player out of the game
Skeleton scale[Obsoleto] (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[Obsoleto] 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
Switch Custom Camera Switching the target player’s camera to the target camera
Get Current Custom Camera Get the camera entity currently used by the target player