VRC_CombatSystem

🚧

Deprecated

This component is deprecated. It is not available in the latest VRChat SDK, and is either non-functional, or will no longer receive updates. It may be removed at a later date.

If added to a scene, health and damage can be added to all players in the scene. Use in conjunction with AddHealth and AddDamage. To target player objects with those trigger actions, leave the target gameobject parameter empty.

ParameterDescription
float maxPlayerHealthA float, representing the maximum health a player can have.
bool respawnOnDeathIf true, players will automatically respawn to the respawnPoint post death, after repawnTime. If false, respawn must be handled manually.
GameObject respawnPointA gameobject representing where players will respawn on death.
float respawnTimeA float, representing the amount of time after player death, after which the player will respawn at the respawnPoint.
bool resetHealthOnRespawnIf true, players' health will be set to maxPlayerHealth upon respawning.
GamObject visualDamagePrefabA gameobject that spawns when a player takes damage. If empty, there is a default damage indicator.
VRC_Trigger onPlayerKilledTriggerA trigger that is called with a player's health reaches zero.
VRC_Trigger onPlayerHealedTriggerA trigger that is called when a player is healed.
VRC_Trigger onPlayerDamagedTriggerA trigger that is called when a player takes damage.
System.Action<VRC_PlayerApi> onPlayerKilledA function that is called with a player's health reaches zero. Requires scripting.
System.Action<VRC_PlayerApi> onPlayerHealedA function that is called when a player is healed. Requires scripting.
System.Action<VRC_PlayerApi> onPlayerDamagedA function that is called when a player is damaged. Requires scripting.
System.Action<VRC_PlayerApi> onSetupPlayerA function that is called during player setup. Use this to setup the player. Requires scripting.