Easy =)
Conditions:
System: For each BLOCK
Player: is overlapping BLOCK at offset 0,1
Action:
BLOCK: Set Animation Frame to 1
BLOCK: Set Solid on (this allows the character to step over the blocks, but if there's an enemy following you, he'll fall)
Now, to recover the state of a single block, it's just the same:
Conditions:
System: For each BLOCK
Player: is overlapping BLOCK at offset 0,1 (INVERT)
Action:
BLOCK: Set Animation Frame to 0
BLOCK: Set Solid off
Now I'm trying to do the same with a full animation. I'll be back
EDIT: Done!
If you want to use animation looping. First of all, of course, make the animation and set it on loop. Then, just change the action "animation frame" for "Start animation from beginning" in the NOT overlapping action line.