Hi,
I decided to design a remake of Line rider (if you don't know what that is, google it). Although this version will have a drag and drop mechanisim. There is probably some obvious reason for it, but I cannot get it to work! Here is my code, It will be greatly appriciated if someone could help! Thank you!
Remstart
--------------------------------------
-- This is an edit of LineRider --
-- This is by no means commercial --
-- Remake By Robert Lee --
-- May 2007 --
--------------------------------------
Remend
`Synchronize the screen
SYNC ON
`Load the images
Load image "LINE----.jpg",1
Load image "LINE--A.jpg",2
Load image "guy.jpg",3
Do
Gosub Variables
Gosub Sprite_Layout
Gosub Mouse_Clicker
Gosub Play_Rider
Sync
Loop
REM These are the subroutines:
`Variables Subroutine
Variables:
my=mouseY()
mx=mouseX()
Xhalf=320
Yhalf=210
Return
`AutoLayout
Sprite_Layout:
Sprite 1,Xhalf,Yhalf-200,1
Return
`Click and drag the track piece
Mouse_Clicker:
If my=Yhalf and mx=Xhalf
if mouseclick()
if my>Yhalf or my<Yhalf
if mouseclick()
sprite 1,mx,my,1
endif
endif
endif
endif
Return
`Play rider
Play_Rider:
Return
If you need the media files to solve this problem, please notify me.
Thanks again!