Ok. Airships. Are. Boss. So, these 3 things can acomplish that.
Magnets are unnafected by gravity and sold by There are 2 variants, positive and negative. One kind would move towards the other. When they receive a signal, they would swap from positive to negative, or negative to positive. Magnets could be hammered to only chase magnets in one direction.
Glue was suggested in my slime village suggestion. Didn't read that? Than just say the mechanic sells it. It allows objects with gravity to be attached to ones without. They would then both float. However, it has a new feature with magnets. Glue could attach things to magnets, allowing them both to chase or be chased by the others.
The new sensor would be a "sensor location" Sensor. You could chose depth or horizontal position, and it would send a signal once it reaches said position, and not be able to send another signal until it leaves that place and comes back again.
This is a special switch that would turn magnets on or off. They would not chase when off.