Can I copy animations from one enemy to another?
Asked Answered
J

2

0

Hi guys!
I just created the animations for an enemy in an isometric game. My spritesets contain 8 lines with 32 frames per line. So, for each of the eight directions I have seven different actions, thus I need to create 56 animations in the AnimatedSprite2D. I'm having currently 6 enemies, but their spritesheets are all layouted in the same way.
I know that Godot saves everything in project text files. My questions is now: is it possible to copy & paste some of the project files, edit them in a text editor (changing the PNG filename e.g.), so that all animations are copied for all other enemies? Which project files would that be and is there something important to know, so that I don't break my project?

P.S.: Is this a bug: sometimes if I add new animations, Godot remembers the settings of the spritesheets (e.g. when I created my hero animations), but for the first enemy it currently goes back to default horizontal = 4, vertical = 4, so that I have to change it for each animations, which is anoying.

Joyance answered 4/3 at 17:54 Comment(0)
A
0

This is one of the things godot does so much better than other engines. Yes, you can swap assets in the editor while keeping the same animationplayer or tree or skeletons. I've done it with meshes from different files that shared the same skeleton. I've also swapped entire skeletons to reuse the animations and code with a different model.
I imagine 2D would be no different.

Arjuna answered 5/3 at 9:9 Comment(0)
J
0

Arjuna So you mean I just need to make a copy of enemy 1 and then change the asset? Need to try this. I thought I might need to do it in the project files.

Joyance answered 5/3 at 23:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.