Page 1 of 1

animation_speed doesn't affect corpse animation

Posted: Sun Dec 12, 2021 5:19 am
by heyqule
animation_speed doesn't affect animation in Corpse. Is that intentional?

I was trying to set animation_speed=0.2 on my custom corpse. But it played at the same speed as 1. I tried adding animation_speed = 0.1 to biter's death animation in "function biterdieanimation(scale, tint1, tint2)". That plays at the 1.0 speed as well.

Re: animation_speed doesn't affect corpse animation

Posted: Sun Dec 12, 2021 7:54 am
by posila
Some entitite (turrets being other example that comes to my mind) have <action>_speed properties, in which case, the animation playback speed depends solely on this *_speed property.

1 / <action>_speed = duration of the <action>

Re: animation_speed doesn't affect corpse animation

Posted: Sun Dec 12, 2021 4:17 pm
by heyqule
Thank posila. Changing dying_speed to a low value works. It has a different description in wiki and I didn't expect it to control animation speed as well. :D

https://wiki.factorio.com/Prototype/Corpse#dying_speed
dying_speed
Type: float
Default: 1
Multiplier for #time_before_shading_off and #time_before_removed. Must be positive.