Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Philter |
Hi,
At first maybe some explanations
I have two levels loaded parallel at once. they both are loaded in my main scene under InGame:
Game <— script (Mainnode)
InGame (here I load my levels inside)
Level1
Level2
Inside Level2 is a trigger that sets a global variable (Globals.delete_level).
This variable defines the Level i want to remove. In my case now its Globals.delete_level = 1.
Now in the gamescript i want to remove the Level defined by the the variable and this is what I’m struggling with right now…
from my knowledge I would do it like this:
$InGame.get_node(“Level”, Globals.delete_level).queue_free()
but I get the following error:
Too many arguments for “get_node()” call. Expected at most 1.
I see the problem with the two arguments inside get_node() but i cant find a solution…
I hope someone can help me
thank you for your answers