turret animation not working correctly.

Place to get help with not working mods / modding interface.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

turret animation not working correctly.

Post 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)
Attachments
bobrobotenemies_0.17.0.zip
(34.06 KiB) Downloaded 38 times
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: turret animation not working correctly.

Post 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"
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: turret animation not working correctly.

Post 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.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Koub
Global Moderator
Global Moderator
Posts: 7955
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: turret animation not working correctly.

Post by Koub »

[Koub] Then I'm moving this to Modding Help subforum, because it can be useful for other modders.
Koub - Please consider English is not my native language.
Post Reply

Return to “Modding help”