Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Actor heat: Difference between revisions

From Cobalt Wiki
m 1 revision imported: Try to import fandom pages (manual dump, 3)
No edit summary
 
Line 20: Line 20:


-- You need to call all of those to set the heat to a positive value.
-- You need to call all of those to set the heat to a positive value.
[[Category:Official_Modding_API]]
__INDEX__

Latest revision as of 11:07, 11 August 2025

Actor.heat
This Property represents the heat of an actor, as in the current temperature. Basically, the thing that will kill an Actor when you either shoot a plasma gun at it, or it falls into lava. It should be noted that setting it to a negative value outright will not cause an error, but setting it to a positive value without the proper functions called before will.
Returns
Heat as an integer.
local chosenActor = API.getPlayerActor()-- Use the modding API to get the player Actor
chosenActor.heat = chosenActor.heat - 100 -- Notice it must be set relatively. 
local Newmonster = API.getPlayerActor()
Newmonster:updateHeatEffect(100, Newmonster.heat+1) -- I believe these two functions are interchangeable. 
Newmonster:addHeatEffect(Newmonster.heat) -- ^
Newmonster.heat = Newmonster.heat + 1

-- You need to call all of those to set the heat to a positive value.