Page 1 of 1

turret animation not working correctly.

Posted: Wed May 29, 2019 12:51 am
by bobingabout
And by "turret" I specifically mean the entity of type "turret" as used by worms.

the issue is that when defining a multiple facing set of animations (north, west, south and east) only the north facing animation shows, regardless of which direction the entity is actually facing.
EG, the turret will aim at the player, you move away, it turns to the nearest of those 4 directions, then folds using the north facing animation.

I've considered that I've defined it incorrectly, I've redefined it in 4 or 5 different ways, but it's still possible I'm defining it wrong.

Attached is my heavily WIP mod. Do not use for anything other than bugtesting purposes.
It's the flamethrower turret clone I'm having issues with.

(I mean, I can fix the issue in other ways, like changing direction count to 4 instead of defining the 4 directions for the folding animation, then create an edited sprite sheet of the 4 directions for the folded animation and define that without using function magic. but, if this really is a bug, then it should be considered as such)

Re: turret animation not working correctly.

Posted: Wed May 29, 2019 10:28 am
by posila
You need to add turret_base_has_direction = true, to your "robot-flamethrower-turret" prototype.

Vanilla turrets don't have any particular direction, so their direction is inferred from their gun orientation, and they don't have any variations for different directions of their base, but they do have folding animation with 4 directions. However, vanilla flamethrower has fixed direction (of its base) and always returns to that direction before folding. Its graphics have different variations for direction of its base. Specifically, it has four variations of folding animation (north, east, south, west), but each animation has just one direction. So you were trying to use graphics definition intended for turret with fixed base direction on "free rotating turret"

Re: turret animation not working correctly.

Posted: Wed May 29, 2019 12:20 pm
by bobingabout
posila wrote: Wed May 29, 2019 10:28 am You need to add turret_base_has_direction = true, to your "robot-flamethrower-turret" prototype.

Vanilla turrets don't have any particular direction, so their direction is inferred from their gun orientation, and they don't have any variations for different directions of their base, but they do have folding animation with 4 directions. However, vanilla flamethrower has fixed direction (of its base) and always returns to that direction before folding. Its graphics have different variations for direction of its base. Specifically, it has four variations of folding animation (north, east, south, west), but each animation has just one direction. So you were trying to use graphics definition intended for turret with fixed base direction on "free rotating turret"
Thank you for looking at it Posila. Your solution worked.
I knew it was either something simple, or a bug, and although it was something simple, it wasn't what I'd call obvious. (Base doesn't have directions, because I'm using the gun turret's base)
Thanks for the help.

Re: turret animation not working correctly.

Posted: Wed May 29, 2019 12:53 pm
by Koub
[Koub] Then I'm moving this to Modding Help subforum, because it can be useful for other modders.