• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Scan for specific object in range of another object

zenomex

Member
Hey everyone!

I'm trying to come up with a function that checks if a specific object is in range of the object the code is written in.

I've read things such as using "with(all)", using a ds_list and having a variable in every single object... but I'm stuck and I'd like to know what is the smart way to tackle this issue?

As for background, see attached screenshot. The white object with the red dot represents the player.
When clicking on the player, it should, for example, scan for all the obj_Water within a 512 range of obj_Player.
Then of that list of objects it should have a draw_GUI event.
 

Attachments

Top