You can create a sprite and make it a solid colour and make it invisible.
In the event sheet use:
Every tick --> set newsprite to cursor.X
newsprite is overlapping
object of choice --> do something