Event for entities set on fire

Things that already exist in the current mod API
Post Reply
SilentStorm
Inserter
Inserter
Posts: 27
Joined: Sun Jul 09, 2017 9:19 am
Contact:

Event for entities set on fire

Post by SilentStorm »

I would like to ask about the possibility to detect (via an event) entities that are set on fire.
This could be a generic event with filters or an extension to an existing event with an added filter that allows to get entities that are set on fire.

Should have filters for entity type and the burn stage (e.g. trees have tree_stage which appears to only be affected by trees burning?).

It would allow to trigger actions when things are set on fire and in case of trees also only trigger the action when the tree has burnt for long enough to change to the next stage. Without having to manually scan all trees in an area, which eats all the UPS.

If there is an event already that is fired in these cases I would like to know which.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13282
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Event for entities set on fire

Post by Rseding91 »

Entity damaged.
If you want to get ahold of me I'm almost always on Discord.

SilentStorm
Inserter
Inserter
Posts: 27
Joined: Sun Jul 09, 2017 9:19 am
Contact:

Re: Event for entities set on fire

Post by SilentStorm »

Trees don't actually get damaged (as far as 'damaged' is concerned for events or health points) when burning. They merely progress through the progress variable and then (based on an internal random chance I guess) either remain as completely burnt tree with progress 3, or are deleted from the game. Their health remains the original value throughout and no events are raised afaik.

Post Reply

Return to “Already exists”