Player Class
/Fortnite.com/FortPlayerUtilities /Fortnite.com/Game
Inherits the agent class.
Methods
GetHealth()
float
Returns the health state of the object. This value will between 0.0 and GetMaxHealth
SetHealth(Health:float)
void
Sets the health state of the object to Health.
Health state will be clamped between 1.0 and
GetMaxHealth.Health state cannot be directly set to 0.0. To eliminate
healthfulobjects use thedamageable.Damagefunctions instead.
GetMaxHealth()
float
Returns the maximum health of the object. This value will be between 1.0 and Inf.
SetMaxHealth(MaxHealth:float)
void
Sets the maximum health state of the object.
MaxHealth will be clamped between 1.0 and Inf.
Current health state will be scaled up or down based on the scale difference between the old and new MaxHealth state.
GetShield()
float
Returns the shield state of the object. This value will between 0.0 and MaxShield
SetShield(Shield:float)
void
Sets the shield state of the object.
Shield state will be clamped between 0.0 and
MaxShield.
GetMaxShield()
float
Returns the maximum shield state of the object. This value will be between 0.0 and Inf.
SetMaxShield(MaxShield:float)
void
Sets the maximum shield state of the object.
MaxShield will be clamped between 0.0 and Inf.
Current shield state will be scaled up or down based on the scale difference between the old and new MaxShield state.
Damage(Amount:float)
void
Damage the damageable object anonymously by Amount. Setting Amount to less than 0 will cause no damage. Use Damage(damage_args) when damage is being applied from a known instigator and source.
Damage(Args:damage_args)
void
Damage the damageable object by Args.Amount. Setting Amount to less than 0 will cause no damage.
Heal(Amount:float)
void
Heal the healable object anonymously by Amount. Setting Amount to less than 0 will cause no healing. Use Heal(healing_args) when healing is being applied from a known instigator and source.
Heal(Args:healing_args)
void
Cause Args.Amount damage to the damageable object. Setting Amount to less than 0 will cause no damage.
SendToLobby()
void
Sends InPlayer back to the main game lobby.
IsSpectator()
void
Succeeds if InPlayer is spectating the experience. Fails otherwise.
GetPlayersSpectating()
[]player
Returns an []players currently spectating InPlayer.
Respawn(RespawnPosition:vector3, RespawnRotation:rotation)
void
Respawns the character for InAgent at the provided RespawnPosition and applies the yaw of RespawnRotation.
Events
Damage Args
Instigator
game_action_instigator
Player, agent, etc. that instigated the damage to the object.
Source
game_action_causer
Player, weapon, vehicle, etc. that damaged the object.
Amount
float
Amount of damage to apply to the object.
Damage Result
Target
damageable
Object that was damaged.
Amount
float
Amount of damage applied to Target.
Instigator
game_action_instigator
Player, agent, etc. that instigated the damage to Target. Can be false when damage is instigated by code, the environment, etc.
Source
game_action_causer
Player, weapon, vehicle, etc. that damaged Target. Can be false when damage is caused by code, the environment, etc.
Healing Args
Instigator
game_action_instigator
Player, agents, etc. that instigated the healing of the object.
Source
game_action_causer
Player, weapon, vehicle, etc. that healed the object.
Amount
float
Amount of healing to apply to the object.
Healing Result
Target
healable
Object that was healed.
Amount
float
Amount of healing applied to Target.
Instigator
game_action_instigator
Player, agent, etc. that instigated healing of the Target. Can be false when damage is instigated by code, the environment, etc.
Source
game_action_causer
Player, weapon, vehicle, etc. that healed Target. Can be false when damage is caused by code, the environment, etc.
Last updated