Actor health: Difference between revisions
From Cobalt Wiki
More actions
Koza1brada (talk | contribs) m 1 revision imported: Try to import fandom pages (manual dump, 3) |
Koza1brada (talk | contribs) No edit summary |
||
| Line 12: | Line 12: | ||
local chosenActor = API.getPlayerActor()-- Use the modding API to get the player Actor | local chosenActor = API.getPlayerActor()-- Use the modding API to get the player Actor | ||
chosenActor.health = chosenActor.health + 10000 -- Give him lots of health. | chosenActor.health = chosenActor.health + 10000 -- Give him lots of health. | ||
[[Category:Official_Modding_API]] | |||
__INDEX__ | |||
Latest revision as of 11:07, 11 August 2025
| Actor.health | ||
| This Property represents the health of a given Actor, however it should be noted that it is not possible to directly kill an actor by setting health to 0, but only possible to make him invincible by setting it to a high value. | ||
| Returns | ||
| Health as an integer. |
local chosenActor = API.getPlayerActor()-- Use the modding API to get the player Actor chosenActor.health = chosenActor.health + 10000 -- Give him lots of health.