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.

Parameter

Description

float maxPlayerHealth

A float, representing the maximum health a player can have.

bool respawnOnDeath

If true, players will automatically respawn to the respawnPoint post death, after repawnTime. If false, respawn must be handled manually.

GameObject respawnPoint

A gameobject representing where players will respawn on death.

float respawnTime

A float, representing the amount of time after player death, after which the player will respawn at the respawnPoint.

bool resetHealthOnRespawn

If true, players' health will be set to maxPlayerHealth upon respawning.

GamObject visualDamagePrefab

A gameobject that spawns when a player takes damage. If empty, there is a default damage indicator.

VRC_Trigger onPlayerKilledTrigger

A trigger that is called with a player's health reaches zero.

VRC_Trigger onPlayerHealedTrigger

A trigger that is called when a player is healed.

VRC_Trigger onPlayerDamagedTrigger

A trigger that is called when a player takes damage.

System.Action<VRC_PlayerApi> onPlayerKilled

A function that is called with a player's health reaches zero. Requires scripting.

System.Action<VRC_PlayerApi> onPlayerHealed

A function that is called when a player is healed. Requires scripting.

System.Action<VRC_PlayerApi> onPlayerDamaged

A function that is called when a player is damaged. Requires scripting.

System.Action<VRC_PlayerApi> onSetupPlayer

A function that is called during player setup. Use this to setup the player. Requires scripting.


Did this page help you?