Here's the .capx: https://dl.dropbox.com/u/1910765/problem.capx
Basically, you destroy the blocks clicking on them, and when you do the blocks that are on top of the one you destroyed "fall" down on top of the others.
The blocks on the left work fine because they are all the same size, but the the other 2 piles if you destroy the bigger block, the ones on top won't fall down enough because in the events I only move them +40 pixels.
You can find that on the events where it says Blocks->Set position Self.Y+40
So what I need is to change that Self.Y+40 to some kind of expression that finds the correct distance between the blocks on top and the checkdummy object, so even when the blocks are larger, once you destroy them, the blocks on top will position themselves correctly.
The checkdummy object is the grey sprite that it always positions itself on top of the pile, so everytime you destroy a block, this will create a gap and the checkdummy will position itself there. I thought this could come in handy, but since I suck at math I have a really hard time with expressions, maybe you guys can think of something.
Also, I need to do this with that one expression preferably, I don't want to have a bunch of different events depending on the size of the block.
Of course if you know of a better way to do this let me know too. Thanks. Feel free to ask anything.