L
ladlon
Guest
Hello. So, I just wanted to make sure this is the right way to do this....
I have a routine that is placing instances on the screen at various (known) locations (...32 pixel 'tile' blocks at regular distances from each other).
I then have a routine that will remove some of those blocks.
I do not know the ID of each of the blocks (as they are created dynamically, at a point earlier in the code), but I do know the location of the blocks I wish to delete.
So, I figure I use the instance_position command to get the ID of the block/instance at that (known) position.
And then, I use the newly aquired ID value to destroy the instance? But, I'd have to use a 'with' command, because it's my 'main loop' that is containing the code (and not the target object)? (The code is all in a script that is called by the room item)
Could someone type out the code for that, just so I can be sure I have it right?
I have a routine that is placing instances on the screen at various (known) locations (...32 pixel 'tile' blocks at regular distances from each other).
I then have a routine that will remove some of those blocks.
I do not know the ID of each of the blocks (as they are created dynamically, at a point earlier in the code), but I do know the location of the blocks I wish to delete.
So, I figure I use the instance_position command to get the ID of the block/instance at that (known) position.
And then, I use the newly aquired ID value to destroy the instance? But, I'd have to use a 'with' command, because it's my 'main loop' that is containing the code (and not the target object)? (The code is all in a script that is called by the room item)
Could someone type out the code for that, just so I can be sure I have it right?