SmokeWithTrigger duration vs animation time and cyclic

Place to report issues and suggest improvements to the API documentation.
Senpai1337
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Apr 04, 2021 9:32 pm
Contact:

SmokeWithTrigger duration vs animation time and cyclic

Post by Senpai1337 »

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
Senpai1337
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Apr 04, 2021 9:32 pm
Contact:

Re: SmokeWithTrigger duration vs animation time and cyclic

Post by Senpai1337 »

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?
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: SmokeWithTrigger duration vs animation time and cyclic

Post by Bilka »

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.
Added to the docs with the next release, thanks for the note.
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.
Try posting that in the modding interface request forum, it will get missed here.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Documentation Improvement Requests”