Hi,
Spent too long trying to debug this, but it seems that the duration on entities 'smoke-with-trigger' gets seemingly ignored unless the cyclic property is set to true.
If you don't have cyclic set (or it's false), then the entity will expire (not get destroyed or dies, since those events never got fired either) when the animation completes instead of the actual prototype duration or time-to-live on the entity.
I'd also like to suggest a potential alternative, if the animation runs out before the duration runs out, the entity should just stop animating instead of immediately expiring. If it had stopped animating instead of just disappearing, that would have made it much more clear to me what I was doing wrong.
https://lua-api.factorio.com/latest/pro ... otype.html
SmokeWithTrigger duration vs animation time and cyclic
-
- Manual Inserter
- Posts: 4
- Joined: Sun Apr 04, 2021 9:32 pm
- Contact:
-
- Manual Inserter
- Posts: 4
- Joined: Sun Apr 04, 2021 9:32 pm
- Contact:
Re: SmokeWithTrigger duration vs animation time and cyclic
Would also be helpful if fade_away_duration and fade_in_duration showed some more details about how they work.
I'm assuming they fade during those, `fade_in_duration` from the first tick it's created to X tick, and `fade_away_duration` is from (last tick - X ticks) until last tick, and during those times it's a linear fade in/out?
I'm assuming they fade during those, `fade_in_duration` from the first tick it's created to X tick, and `fade_away_duration` is from (last tick - X ticks) until last tick, and during those times it's a linear fade in/out?
Re: SmokeWithTrigger duration vs animation time and cyclic
Added to the docs with the next release, thanks for the note.Senpai1337 wrote: ↑Sun Aug 11, 2024 7:12 pm If you don't have cyclic set (or it's false), then the entity will expire (not get destroyed or dies, since those events never got fired either) when the animation completes instead of the actual prototype duration or time-to-live on the entity.
Try posting that in the modding interface request forum, it will get missed here.Senpai1337 wrote: ↑Sun Aug 11, 2024 7:12 pm I'd also like to suggest a potential alternative, if the animation runs out before the duration runs out, the entity should just stop animating instead of immediately expiring. If it had stopped animating instead of just disappearing, that would have made it much more clear to me what I was doing wrong.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.