Forgive the simplicity of this question - I have done a lot of searching and I've been at this for hours, I promise.
To simplify this problem, I have 1 square active object. I also have 1 square "obstacle" backdrop, duplicated several times to make steps descending to the right. The idea is to make the object fall when it's not on a backdrop but move right when it is. And the move and fall rate are different.
OBJECT overlaps backdrop: StartLoop "Horiz" x 2
OBJECT Does Not overlap backdrop: StartLoop "Vert" x 4
OnLoop "Vert": Set y(OBJECT)+=1
OnLoop "Horiz": Set x(OBJECT)+=1
OnLoop "Vert" && OBJECT overlaps backdrop: StopLoop "Vert"
OnLoop "Horiz" && OBJECT Does Not overlap backdrop: StopLoop "Horiz"
This works fine, except when I duplicate the object and put them at varying heights. In that case, it gets wonky when one is overlapping a backdrop and one isn't. If I wanted more than one of these OBJECTS, what would I do?
I have the ForEach extension if that helps.