Page 1 of 1

animations start at random frame &animation render layer bug

Posted: Wed Apr 25, 2018 10:19 pm
by ownlyme
When using the trivial-smoke prototype for, lets say an energy shield with an animation, the animation starts playing at a random frame so it won't make a perfect loop.
I tried using a dummy with the unit-spawner prototype, but I can't get the render layer higher than the turret-gun with that one.

Re: Fog animation starts at random frame

Posted: Wed Apr 25, 2018 10:30 pm
by Bilka
You can use a simple-entity for animations: https://github.com/Bilka2/Portals/blob/ ... ls.lua#L27

Re: Fog animation starts at random frame

Posted: Wed Apr 25, 2018 10:34 pm
by ownlyme
i already tried the type "simple-entity", it also starts the animation at a random frame.
the "random_animation_offset = false" flag you used has no effect on any of the prototypes, i couldn't find it anywhere in the game's vanilla entities either, where did you get this from?

it seems like specifying a render_layer (of any kind, i also tried final_render_layer, gun_animation_render_layer, base_picture_render_layer, animation_render_layer) doesn't affect the layer of the animation at all

when i change the gun_animation_render_layer of the turrets to "lower-object-above-shadow", my animations get rendered above, but i couldn't find out how to change the render layer of the pipe covers which still get rendered above my shield

this is currently my prototype:
prototype
it would work with a beacon prototype too, but i don't know which one would be more performance-friendly

on the attached picture i haven't changed the gun render layer

Re: animations start at random frame &animation render layer bug

Posted: Thu Apr 26, 2018 7:30 am
by posila
smoke-with-trigger always starts its animation at frame 0; only some prototypes have configurable render layers, smoke-with-trigger is one of them (it reads "render_layer" property).

Re: animations start at random frame &animation render layer bug

Posted: Thu Apr 26, 2018 7:48 am
by Bilka
ownlyme wrote:the "random_animation_offset = false" flag you used has no effect on any of the prototypes, i couldn't find it anywhere in the game's vanilla entities either, where did you get this from?
The ``random_animation_offset`` flag defaults to false, so you dont see an effect if you just leave out the line on the simple entity prototype.

Re: animations start at random frame &animation render layer bug

Posted: Thu Apr 26, 2018 8:04 am
by posila
random_animation_offset controlls if entities will have same frame based just on current tick or they will add also random offset to frame calculated from tick number

Re: animations start at random frame &animation render layer bug

Posted: Thu Apr 26, 2018 3:43 pm
by ownlyme
The smoke-with-trigger prototype is what i was looking for
thank you everyone!

I think there should be a property to make animations play properly though.

And the prototypes should be documented better, they are the hardest part about modding.

Re: animations start at random frame &animation render layer bug

Posted: Mon May 07, 2018 5:17 pm
by Rseding91
ownlyme wrote:And the prototypes should be documented better, they are the hardest part about modding.
They aren't documented at all right now. Just what the wiki shows from whoever decides they want to work on it at the time.