Godot Version
4.2.2
Question
Hi all,
Now I am up to something that I have no idea how to do in Godot. It was something that was so trivial that I did in Unity and so easy I forgot how it was done.
So, I was trying to do it on my own in Godot and have ran into a problem.
The thing is this, I can pick up a bomb with a key press - move it - and drop somewhere else with another key press. The idea was simple when I drop the “bomb”, it animates and a sound is generated. Then after that the game was to generate a list of bodies and then make some of the bodies that meet certain criteria to be destroyed/or use queue.free in Godot.
The bomb is created like this:
The outer layer being the area I need for any hits.
So, I used this code in one of the functions:
#trying to get a list of all item in collision radius
var bodies = bomb_collision_area.get_overlapping_bodies();
var i=0;
for body in bodies:
i+=1;
print(str(i) + ": " + str(body) );
#play animation of the explosion
And it is only generating two bodies, the hero, and one of the tiles maps. Where I drop the bomb is shown here on the game map showing how many hits there should be at least 3 tilemaps, and the player, which is in the vicinity when it is dropped - so a minimum of 4 hits.
If anyone can come up with a way of making all these objects result in a hit here is a big thankyou in advance.
Regards.