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.
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
-
25 KB Views: 4