Think I mis understood.
termanolagy I'm not 100% on
You want the white puck to not overlap while choosing a place to use it from?
So instead of going red, you want it to lock to the nearest available position? Until the mouse has taken it past a point.
Say the blocking piece is 50 wide.
On colision set the piece to have a boolean.
When boolean is checked.
While
Boolean is true
mouse x is between piece.x-25 and piece.x
Set puck.x to piece x-50
While
Boolean is true
mouse x is between piece x+25 and piece.x.
Set puck to piece x+50
I turned off the computer, cant test it untill tomorrow.
But, that should activate a piece on contact. And set the puck location to next to the piece right or left, depending on the mouse location.
Just have to turn off boolean when mouse goes past
This will lead to more issues if 2 pieces are next to each other. I'll work on it tomorrow if that's what you need.