- Edited
Hi there. I can get information I want from get_overlapping_bodies() in the console with something like this:
var overlaps = get_overlapping_bodies()
if overlaps != []:
print(str(overlaps))
And in my case, in the situation that I want to return true, the console gives me [[TileMap:1379]]
, whose name in the tree is $nBlock
.
What I can't figure out is how do something like this:
if overlaps.has("[TileMap:1379]"):
#do something
All variations I can think of for phrasing this don't seem to work. What am I doing wrong? Preferably a solution where I can use $nBlock, or better yet check for a group, instead of the numerical ID which I don't think you're supposed to access directly in this way in the first place.