![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | fisox.zero |
Lets say I clicked a button to remove sprite (not just hide it).
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | fisox.zero |
Lets say I clicked a button to remove sprite (not just hide it).
![]() |
Reply From: | SIsilicon |
Okay okay. n00b ;P.
To remove a sprite with script depends on what node owns the script. If that node is the-
queue_free()
.remove_child('your sprite')
.'your sprite'.queue_free()
.I maybe over complicating things with the second one. You don’t need to use that one. And the ‘your sprite’ parts are references to the sprite. Which you can get with get_node('relative path to sprite')
. To learn more about paths, just visit the Godot docs.