To get back to Godot after a long hiatus, I've been trying the tutorial from Kidscancode, "Your first 2D Game".
I mostly succeeded (there's a strange behavior for the bullets, they shoot by two, while apparently they're supposed to be shot one by one) and then there's the "try adding a new feature", in which I added different enemy types.

So I duplicated the enemy.tscn scene (and its script), renamed it for the three different enemies, and added code to call the different enemies.

It works fine, but the problem is that all the enemies come with the image of the "bonbon" picture (the one used for the enemy used in the tutorial).
Checking the scenes, it appears that even though I did add the specific images ("alan" and "lips" respectively) in the "Texture" property of the Inspector, after saving the scene this Texture property reverts from "alan" (or "lips") to "bonbon".

Thing is, in the original enemy.tscn there are animations ("bounce", "reset", and "explode") that I created while following the tutorial, and which used the original texture ("bonbon").
If I delete all the animations, the right image stays on the Texture, and appears in the game.
But it means that I need to redo all the animations by hand, which is quite tedious.

I thought that duplicating nodes from a template was the right workflow when we are using a lot of similar nodes ?
Isn't it possible when theses nodes have animations ? Do all the animations need to be redone by hand one by one ?
Seems very inefficient...

  • xyz replied to this.

    LienRag Make all resources in the duplicate scene unique.

    Seems a good idea indeed, could you elaborate ?

    • xyz replied to this.
      • Edited

      LienRag Did you make edits to the "texture" track in the scene duplicates? It's likely that this track is setting the original texture.

      What do you mean by "track" ?
      The problem lies with the Animation player : I changed the texture in the Sprite2D (in the duplicates, not in the original) but the one in the animation player overrides it.