Burnable

This component allows your prefab to ignite and burn. This does not include fire spread! (see propagator)

Notice that you can use MakeSmallBurnable(inst, time, offset), MakeMediumBurnable(…) and MakeLargeBurnable(…) for standard objects, and MakeSmallBurnableCharacter(inst,  sym, offset), MakeMediumBurnableCharacter(…) and MakeLargeBurnableCharacter(…) for standard creatures.

Component Burnable Fields

TypeNameDescription
numberBurntimehow long it takes to burn up, in seconds (?).
booleancanlightEnable/disable the player to light the fire using a torch or alike.
booleanburningCheck whether the prefab is on fire.
functiononigniteFires when fire starts. Args: inst
functiononextinguishFires when fire gets put out. Args: inst
functiononburntFires when the burntime is reached. Args: inst

Component Burnable Methods

NameParameterReturnsDescription
AddBurnFXprefab, offset, followsymbolnilFor advanced effects.
SetFXLevellevel, percentnilControl whether it's an inferno or a candle.
Igniteimmediatenil"immediate" only affects the effects.
Extinguishnilnil-

Component Burnable Events

NameDataFires in/when...
onignitenilIgnite
onextinguishnilExtinguish

Example

Notice that the firepit doesn’t remove itself when burnt, unlike the campfire. As mentioned above, the fueled component handles most things.