GML Returning 'True' when all objects have stopped moving?

Amon

Member
I have a level with blocks that start moving and only stop when hitting a barrier. Now, before the blocks can move again, all blocks must have stopped moving. How would I go about doing this script wise?
 

Amon

Member
I tried that but if one block remains moving a flag I set always returns false and breaks the movement code.

I have a cubeparent where I move each block within that parents step event.

GML:
with ( oCubeParent )
{
    if ( isMoving == 1 )
    {
        oCubeController.MovingCubes = 1;   
    }else
    {
        oCubeController.MovingCubes = 0;
        oCubeController.CubesCanMove = 1;
        oCubeController.Direction = "idle";
                
    }
}
 
Top