AnimatedTexture for two objects is same but must be as different instance

Hello gyus!
Shortly: I have object scene - Cursor. Scene store Control - TextureRect with AnimatedTexture with 2 frames. I need to create N instances of that cursor in ONE scene, but if I do that, texture changing in cursor 1 applies on cursor 2 and … cursor N.
How to create Scene (.tscn) correctly as Unique Instance in another scene?

  • I’ve tried to deal with local_on_scene flag (maybe incorrectly)
  • I’ve tried to duplicate from scene like load(…).instantiate().duplicate()
  • I dont try to write full Cursor object programmatically, and this way will be the next if i not find the answer here.

will be grateful for any help!

P.S> Sorry for my bad english!



And will be greate to understand how creating new object’s work with tscn. THanks!

I think you do everything correctly but

cursor2.get_child(0).texture.pause = true

freeze everything not just cursor2.

I think it is not possible to use pause because pause is a variable of the texture pack
It is better to use animated sprites or just replace the current texture with a new one

1 Like

Thank you very much for your answer! This works! ;D
But i feel it strange, when the texture variable is like a static and not local with that descr.

Anyway, thank you very much my friend!

1 Like