Why wont this code print the mousex and mousey positions, unless the mouse is positioned at certain points?(the point that were the previous bounderies of each button before i changed the menu). It was working before when i was testing to find the bounderies of the buttons for the first menu, but then i deleted the code, and tryed to do it again and it wont work now, sry i dont really want to include media, cause its like 7 things, so could someone plz look at it and tell me why it wont work? Here it is:
sync on
``````````````make menu`````````````````````
rem Load The Image For your menu
load image "menu1.bmp",27
`open to read 1,"textures-main menu"
`read memblock 1,1
`make image from memblock 27,1
`close file 1
load image "menu1-newgame.bmp",28
`open to read 2,"textures-menu1-newgame"
`read memblock 2,2
`close file 2
load image "menu1-quit.bmp",29
`open to read 3,"textures-quit"
`read memblock 3,3
`close file 3
load image "menu1-loadgame.bmp",30
`open to read 4,"textures-loadgame"
`read memblock 4,4
`close file 4
load image "menu1-options.bmp",31
`open to read 5,"textures-quit"
`read memblock 5,5
`close file 5
load image "menu1-extras.bmp",32
`open to read 6,"textures-extras"
`read memblock 6,6
`close file 6
load image "menu1-credits.bmp",33
`open to read 7,"textures-credits"
`read memblock 7,7
`close file 7
rem Start main loop
do
rem This finds the position of the mouse on your screen
mx# = mousex()
my# = mousey()
if mx#>60 and mx#<296 and my#>53 and my#<176
paste image 28,0,0
endif
if mx#>305 and mx#<540 and my#>313 and my#<635
paste image 29,0,0
endif
if mx#>0 and mx#<60 or mx#>296 and mx#<305 or mx#>540 or my#>0 and my#<53 or my#>635
paste image 27,0,0
endif
if mx#>305 and mx#<540 and my#>53 and my#<176
paste image 30,0,0
endif
if mx#>60 and mx#<296 and my#>183 and my#<306
paste image 31,0,0
endif
if mx#>305 and mx#<540 and my#>183 and my#<306
paste image 32,0,0
endif
if mx#>60 and mx#<296 and my#>313 and my#<635
paste image 33,0,0
endif
if mx#>60 and mx#<296 and my#>53 and my#<176 and mouseclick()=1
cls
gosub _play_game
endif
if mx#>305 and mx#<540 and my#>53 and my#<176 and mouseclick()=1
`insert load game gosub routine
endif
if mx#>60 and mx#<296 and my#>183 and my#<306 and mouseclick()=1
`insert options gosub routine
endif
if mx#>305 and mx#<540 and my#>183 and my#<306 and mouseclick()=1
`insert extras gosub routine
endif
if mx#>60 and mx#<296 and my#>313 and my#<635 and mouseclick()=1
gosub _credits
endif
if mx#>305 and mx#<540 and my#>313 and my#<635 and mouseclick()=1
end
endif
rem End main loop
sync : loop
_credits:
cls
load image "credits.bmp",34
paste image 34,0,0
do
if mouseclick()=1 and mx#>60 and mx#<296 and my#>313 and my#<635
return
endif
loop
Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.