![]() |
Eye of the Nile Docs
Everything you need to know to get started!
|
Script for a fire object, such a big fire, wall of fire, anything that's fire. If burnout enabled, the fire will despawn after burnoutTime has passed. If an entity collides with the fire, it will be set on fire and take fire damage.
Documentation updated 8/26/2024
Private Member Functions | |
void | Start () |
Play set on fire sound effect and start burnout timer (if those are enabled). | |
void | OnTriggerEnter2D (Collider2D col) |
If an object entered this fire, set it on fire (unless damageNonPlayers or damagePlayer dictates otherwise). | |
IEnumerator | BurnoutTimer () |
Wait burnoutTime seconds, then destroy this fire. | |
Private Attributes | |
int | damageCount = 6 |
How many times damage should be dealt after being set on fire by this object. | |
float | damageSpeed = 0.5f |
How quickly damage should be dealt after being set on fire by this object. | |
int | damage = 5 |
Damage being set on fire from this object will do (every damageSpeed seconds). | |
float | burnoutTime = 10f |
Seconds until fire despawns (if enabled). | |
bool | burnout = false |
If burnout enabled, the fire will despawn after burnoutTime has passed. | |
bool | damageNonPlayers = true |
If true, entities that are not the player will be set on fire when stepping into this object. | |
bool | damagePlayer = true |
If true, the player will be set on fire when stepping into this object. | |
EventReference | spawnSFX |
Sound effect that plays when the object first spawns in. | |
bool | playSFXOnSpawn = false |
Play a set-on-fire sound effect when spawned. | |
|
private |
Wait burnoutTime seconds, then destroy this fire.
|
private |
If an object entered this fire, set it on fire (unless damageNonPlayers or damagePlayer dictates otherwise).
col | Represents the object that entered the fire. |
|
private |
Play set on fire sound effect and start burnout timer (if those are enabled).
|
private |
If burnout enabled, the fire will despawn after burnoutTime has passed.
|
private |
Seconds until fire despawns (if enabled).
|
private |
Damage being set on fire from this object will do (every damageSpeed seconds).
|
private |
How many times damage should be dealt after being set on fire by this object.
|
private |
If true, entities that are not the player will be set on fire when stepping into this object.
|
private |
If true, the player will be set on fire when stepping into this object.
|
private |
How quickly damage should be dealt after being set on fire by this object.
|
private |
Play a set-on-fire sound effect when spawned.
|
private |
Sound effect that plays when the object first spawns in.