animation_speed doesn't affect corpse animation

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Sun Mar 05, 2017 1:35 am
Contact:

animation_speed doesn't affect corpse animation

Post 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.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: animation_speed doesn't affect corpse animation

Post 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>

heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Sun Mar 05, 2017 1:35 am
Contact:

Re: animation_speed doesn't affect corpse animation

Post 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.

Post Reply

Return to “Modding discussion”