Magical girl transformation

Godot Version

`4.4

Question

So I’m trying to make a magical girl game, with the gimmick of transformation, the thing is, I don’t know how to approach transformation

One guy on. Discord mentioned having the scene handle the transformation, I asked for more information on who I would do that but…he didn’t respond x.x

Currently I have 2 ideas

1: have the nodes switch between each other.
This in theory would work but the issue is that they both show on screen at the same time and. In different positions

2: having a separate scene for the. Human and magical girl variants, and when a button is pressed the game switches between those 2 scenes, the thing is that, they have to carry the same resource bar and hp amount, so if human variant has 50/100 HP then magical girl variants should have 50/100 HP too. And I have tried doing when x input is pressed, “change scene to file (tscn)” ,it doesn’t bring up any errors but it also doesn’t switch to the scene either TwT so I honestly don’t know what I’m directly doing wrong TwT I’m still newbi, but once. I get this transformation down- most of the rest should be a breeezeeee…but In coding, nonthing is a breeze x.x

Is the image the only thing you want to change in that transformation? If that’s the case, you can change the image tied to a Sprite2D (I’m assuming that’s what you’re using) in code.

You can also .hide() and .show() individual nodes, and can test .is_visible_in_tree() to see if something is visible.

You could have both your “civilian” and “magical” nodes in the same scene along with health bars and so forth, and just set visibility on them so that only one of the two is visible at any given time. You could have two more for transforms to and from.

Alternately, if this is 2D, you could have everything in a single animated sprite and drive it all with AnimTree.

You probably don’t want to use the SceneTree function for switching scenes, that will delete all the current nodes and replace them with only the magical girl character scene.

No? I thought it was obvious that I would want each form to have different abilities XD and stats

In that case you could also use a State Machine, that way everything is organised in code and you don’t have to switch nodes.