Hi there.
I'm having a problem creating buttons for a graphical interface. I'm trying to make a sprite follow the mouse cursor, and when it collides with a button, it should return the sprite number of the button. It doesn't seem to change though, it just stays on sprite 1 which is the sprite which covers the whole screen and provides a border.
LOAD IMAGE "interfacebar.dds",11
LOAD IMAGE "interfaceborder.dds",12
LOAD IMAGE "cursordot.dds",13
LOAD IMAGE "highlight.dds",14
sprite 1,0,0,12
sprite 2,0,668,11
sprite 3,0,0,13
sprite 4,14,680,14
sprite 5,120,680,14
sprite 6,227,680,14
sprite 7,333,680,14
sprite 8,440,680,14
sprite 9,548,680,14
DO
xposmouse = MOUSEX()
yposmouse = MOUSEY()
PASTE SPRITE 3,xposmouse,yposmouse
PASTE SPRITE 4,14,680
PASTE SPRITE 5,120,680
PASTE SPRITE 6,227,680
PASTE SPRITE 7,333,680
PASTE SPRITE 8,440,680
PASTE SPRITE 9,548,680
spritehit = SPRITE COLLISION(3,0)
SET CURSOR 20,20
PRINT "Sprite Hit: ",spritehit
SYNC
LOOP