Object Health
Gives a GameObject properties for the Combat System. Pairs well with the Damage and Game Instance Controller components.
Properties
Section titled “Properties”Reference ID
Section titled “Reference ID”Read-only. Changing this breaks the component.
Health
Section titled “Health”Health Base Amount
Section titled “Health Base Amount”Default health each player starts with at the beginning of a game or round.
Health Max Amount
Section titled “Health Max Amount”Maximum health a player can have.
Health Regeneration
Section titled “Health Regeneration”Health Regeneration Delay
Section titled “Health Regeneration Delay”Time in seconds before health starts regenerating.
Health Regeneration Rate
Section titled “Health Regeneration Rate”Health recovered per second.
Health Regeneration Cap
Section titled “Health Regeneration Cap”Health value at which regeneration stops.
Armor Base Amount
Section titled “Armor Base Amount”Default armor each player starts with.
Armor Max Amount
Section titled “Armor Max Amount”Maximum armor a player can have.
Armor Regeneration
Section titled “Armor Regeneration”Armor Regeneration Delay
Section titled “Armor Regeneration Delay”Time in seconds before armor starts regenerating.
Armor Regeneration Rate
Section titled “Armor Regeneration Rate”Armor recovered per second.
Armor Regeneration Cap
Section titled “Armor Regeneration Cap”Armor value at which regeneration stops.
Shield
Section titled “Shield”Shield Base Amount
Section titled “Shield Base Amount”Default shield each player starts with.
Shield Max Amount
Section titled “Shield Max Amount”Maximum shield a player can have.
Shield Regeneration
Section titled “Shield Regeneration”Shield Regeneration Delay
Section titled “Shield Regeneration Delay”Time in seconds before shield starts regenerating.
Shield Regeneration Rate
Section titled “Shield Regeneration Rate”Shield recovered per second.
Shield Regeneration Cap
Section titled “Shield Regeneration Cap”Shield value at which regeneration stops.
Inherited ID
Section titled “Inherited ID”string. Copied into the base class referenceID so the object-health system can identify this object. Set from the inspector.
Down Behavior
Section titled “Down Behavior”DownBehavior enum:
- Destroy Deletes the GameObject when it goes down.
- Respawn After Time Respawns after
respawnTimeseconds. - Respawn On Round Start (Requires Game Instance Controller) Respawns when a round starts.
- Respawn On Round End (Requires Game Instance Controller) Respawns when a round ends.
- Respawn On Game Start (Requires Game Instance Controller) Respawns when the game starts.
- Respawn On Game End (Requires Game Instance Controller) Respawns when the game ends.
- Manual Respawn is not automatic; call
Respawn()from an interactable action or scripting.
Respawn Time
Section titled “Respawn Time”Only used with Respawn After Time. Number of seconds before respawn.
Respawn Point
Section titled “Respawn Point”Transform the GameObject respawns at.
Connected Game Instance
Section titled “Connected Game Instance”(Requires Game Instance Controller) The Game Instance Controller the GameObject is bound to.
Events
Section titled “Events”Hooks triggered by the Combat System.
Down Event
Section titled “Down Event”Fires when the GameObject’s health reaches 0.
Respawn Event
Section titled “Respawn Event”Fires when the GameObject respawns.
ObjectHealthextendsHealthfromABI.CCK.Scripts/Health.cs. Health / armor / shield base, max, and regen fields come from the base class.- A static
ColliderIndexdictionary keyed by this GameObject’sCollideris maintained so the combat system can resolve hits quickly.
Related
Section titled “Related”Source
Section titled “Source”CVR-GameFiles/ABI.CCK.Components/ObjectHealth.cs, CVR-GameFiles/ABI.CCK.Scripts/Health.cs