Cheers Nanobrain
That made my menu a little quicker. However when i want to select a Class or Race i have to click several times before it comes up that i have selected it. Do you know any way of fixing this??
Here is the new code
sync rate 0 : sync on
`----------
`---Menu---
`----------
set text size 24
Blue=RGB(0,128,255)
White=RGB(255,255,255)
Set camera View 0,0,1,1
ink white,0
do
set cursor 10,100 : print screen fps()
text 280, 180, "New Game"
text 280,200, "Load Game"
text 280,220, "Options"
text 280,240, "Exit"
`print menu items
If mousex() > 280 and mousex() < 350 and mousey() > 180 and mousey() < 190
ink blue,0:text 280,180,"New Game"
if mouseclick()=1
goto New
Endif
else
ink white,0
endif
If mousex() > 280 and mousex() < 350 and mousey() > 200 and mousey() < 210
ink blue,0:text 280,200,"Load Game"
if mouseclick()=1
text 420,200, "Sorry, this is unavailable"
wait 1000
cls
Endif
else
ink white,0
endif
If mousex() > 280 and mousex() < 340 and mousey() > 220 and mousey() < 230
ink blue,0:text 280,220,"Options"
if mouseclick()=1
text 420,220, "Sorry, this is unavailable"
wait 1000
cls
endif
else
ink white,0
endif
If mousex() > 280 and mousex() < 330 and mousey() > 240 and mousey() < 250
ink blue,0:text 280,240,"Exit"
if mouseclick()=1
End
endif
else
ink white,0
endif
sync
loop
`---------------------
`-Character Selection-
`---------------------
New:
cls
Blue=RGB(0,128,255)
White=RGB(255,255,255)
Race=0
Class=0
set text size 24
ink white,0
do
`-----------
`---STATS---
`-----------
`Races
wait 1500
text 350,20, "STATS"
text 350,50, "Strength":set cursor 450,50:print strength
text 350,70, "Intelligence":set cursor 450,70:print intelligence
text 350,90, "Wisdom":set cursor 450,90:print wisdom
text 350,110, "Accuracy":set cursor 450,110:print Accuracy
text 350,130, "Agility":set cursor 450,130:print Agility
text 350,150, "Charisma":set cursor 450,150:print Charisma
text 350,170, "Endurence":set cursor 450,170:print Endurence
text 350,190, "Dexterity":set cursor 450,190:print Dexterity
text 350,210, "Spirit":set cursor 450,210:print Spirit
text 20,20, "Human"
text 20,80, "Elf"
text 20,140, "Dark Elf"
text 20,200, "Dwarf"
if mousex() > 20 and mousex() < 80 and mousey() > 20 and mousey() < 30
ink blue,0
text 20,20, "Human"
if mouseclick()=1
race=1
racename$="Human"
Agility=12
Charisma=15
Intelligence=9
Spirit=12
endif
else
ink white,0
endif
if mousex() > 20 and mousex() < 70 and mousey() > 80 and mousey() < 90
ink blue,0
text 20,80, "Elf"
if mouseclick()=1
race=2
racename$="Elf"
Agility=17
Charisma=14
Intelligence=9
Spirit=12
endif
else
ink white,0
endif
if mousex() > 20 and mousex() < 80 and mousey() > 140 and mousey() < 150
ink blue,0
text 20,140, "Dark Elf"
if mouseclick()=1
race=3
racename$="Dark Elf"
Agility=15
Charisma=10
Intelligence=9
Spirit=12
endif
else
ink white,0
endif
if mousex() > 20 and mousex() < 80 and mousey() > 200 and mousey() < 210
ink blue,0
text 20,200, "Dwarf"
if mouseclick()=1
race=4
racename$="Dwarf"
Agility=9
Intelligence=6
Charisma=12
Spirit=14
endif
else
ink white,0
endif
set cursor 50,10:print Racename$
`Classes
text 170,20, "Warrior"
text 170,80, "Wizzard"
text 170,140, "Ranger"
text 170,200, "Cleric"
text 170,260, "Druid"
if mousex() > 170 and mousex() < 210 and mousey() > 20 and mousey() < 30
ink blue,0
text 170,20, "Warrior"
if mouseclick()=1
class=1
classname$="Warrior"
Strength=18
Intelligence=Intelligence+5
Accuracy=13
wisdom=10
Endurence=15
Dexterity=15
endif
else
ink white,0
endif
if mousex() > 170 and mousex() < 210 and mousey() > 80 and mousey() < 90
ink blue,0
text 170,80, "Wizzard"
if mouseclick()=1
class=2
classname$="Wizzard"
Strength=9
Intelligence=Intelligence+7
Wisdom=15
Accuracy=14
Endurence=10
Dexterity=10
endif
else
ink white,0
Endif
if mousex() > 170 and mousex() < 210 and mousey() > 140 and mousey() < 150
ink blue,0
text 170,140, "Ranger"
if mouseclick()=1
class=3
classname$="Ranger"
Strength=13
Intelligence=Intelligence+5
Wisdom=12
Accuracy=16
Agility=Agility+1
endif
else
ink white,0
endif
if mousex() > 170 and mousex() < 210 and mousey() > 200 and mousey() < 210
ink blue,0
text 170,200, "Cleric"
if mouseclick()=1
class=4
classname$="Cleric"
Strength=8
Intelligence=Intelligence+7
Wisdom=16
Accuracy=14
Endurence=10
Dexterity=10
endif
else
ink white,0
endif
if mousex() > 170 and mousex() < 210 and mousey() > 260 and mousey() < 270
ink blue,0
text 170,260, "Druid"
if mouseclick()=1
class=5
classname$="Druid"
Strength=11
Intelligence=Intelligence+6
Wisdom=14
Accuracy=14
Endurence=12
Dexterity=12
endif
else
ink white,0
endif
set cursor 100,10:Print classname$
text 400,400, "Proceed"
if mousex() > 400 and mousex() < 440 and mousey() > 400 and mousey() < 410
ink blue,0
text 400,400, "Proceed"
if mouseclick()=1 and race > 0 and class > 0
goto main
endif
else
ink white,0
endif
sync
loop
Thanks Jozers