![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | DarlesLSF |
Hello all, Im creating a battle system (rpg) and when the battle starts I instancing the monsters using the code:
var mons1 = preload("res://Scenes/Batalha/Monstro1.tscn")
var mons2 = preload("res://Scenes/Batalha/Monstro2.tscn")
var mons3 = preload("res://Scenes/Batalha/Monstro3.tscn")
And instancing it:
var m1 = mons1.instance()
var m2 = mons2.instance()
var m3 = mons3.instance()
add_child(m1)
add_child(m2)
add_child(m3)
My questions is: how can I check if the monster are in the tree? In game maker its instance_exists(m1)