Remove an item's node upon loading scene if player has already picked up the item

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

This is a pretty basic question, but how do I remove a node upon loading a scene? I want the player to be able to pick up items, and then have them disappear forever after that. Right now, they just reappear after the player leaves and reenters the scene.

:bust_in_silhouette: Reply From: kufyweruk

nodedelete.get_parent().remove_child(nodedelete)

Sorry, I should have been more clear on with my question. I’m not asking how to remove the node, but how to remove it if the player picked it up in the past.

exuin | 2020-09-12 18:52