On a side note (since Sinaz has already answered your question) you may find this tutorial by Torigara of interest..
http://gmc.yoyogames.com/index.php?showtopic=481823
Thanks, that's a handy link! I'm more or less familiar with the nuances of each, but the instance_ functions are new to me. Then again, I come back to GM every couple of years, and have to relearn from scratch each time!
I'm using this code in my sort of Tetris idea atm:
if place_meeting(x,y+2,Block_Green)
{
instance_destroy()
position_destroy(x,y+32)
}
At this way, it will check or there is a green block 2 below the block where I program it in
if place_meeting(x,y+2,Block_Green)
Then if there is, it will destroy itself
instance_destroy()
And then it will destroy anything that is 32 below the block
position_destroy(x,y+32)
This is a bit a different code then the rest of the replys, so I thought, maybe this can come in handy for some people.
Edited by DamnICantFly, 27 April 2012 - 11:03 AM.