Simple Character Customization in Godot 3

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By StraightUpGruntled

I am currently working on my first long-term project in Godot, and I’m trying to find a way to create a VERY simple character customization. I’m splitting the character up into 3 parts. A body, shirt, and mask. I want to create 10 different types for each, and then have the player be able to choose between them. The hard part is figuring out how I’m gonna animate every possible part once I start animating. How would I go about doing this?

Also my game uses Pixel Art, and it would use a frame by frame animation.

:bust_in_silhouette: Reply From: Zylann

Animations in Godot use paths, so as long as your character respects a given hierarchy of nodes, they will still work regardless of which sprite you select for your 3 parts.

If parts require the animation to change, then you can try to make another animation to play, but if you make it generic enough you can re-use it for different assets as longs as the tree structure stays the same.

You can animate parts separately on top of the “main” character animation, by having them play an animation individually, as long as you don’t have to deal with a combinations nightmare^^ Scripts can help a little to cover the special cases but trying to keep it simple is important.

Another trick about equipment: in a prototype of 2D game, I needed to animate a player’s sword weapon. But instead of animating the sword, I animated the hand (which was a dummy Node2D under which I place the weapon), so I could swap the sword asset to whatever I want. If the weapon’s nature change (switch to an axe or a gun), then I would simply play a different animation but still on the hand. That’s a nice way of reusing animation for equipment.

i try animationplayer individually but sprite keep switch in between cloth and base character T.T

potatobanana | 2018-07-28 14:09