ok, so here it goes, I have made my 3d menu , everything works good, now when i click on start game it goes to
while HyperLink(250,200,"New Game") = 1
gosub levilone
return
endwhile
this works fine, goes to game, im playing, yeaaaa
but, the return to menu,boooo
if escapekey()=1
gosub menu
endif
this is in the main loop, it goes to menu, i know i can here the menu music, but all that is on the screen is my game frozzen with the menu music playing.
here is my coad.
autocam off
cls
rem Choose better display mode
disable escapekey
menu:
Rem *****************************************************************************************
Rem ******** HIGHEST DISPLAY MODE FOR ALL USERS *********
Rem *****************************************************************************************
set dir "files"
if check display mode(1024,768,32)=1 then set display mode 1024,768,32
Rem *****************************************************************************************
Rem ******** LOAD ALL MEDIA FOR MENU *********
Rem *****************************************************************************************
load image "media\dst_L.dds",2
LOAD IMAGE "menu\alien.jpg",1
load music "audio\Moon Rising 13.wav",5
load effect "media\alien 1.fx",1,2
load object "media\Skybox.x",7
load object "media\alien dance.x",5
load object "media\alien pose.x",6
load object "media\alien sholvel.x",8
set effect on 6,"media\alien 1.fx",1
set effect on 5,"media\alien 1.fx",1
set effect on 8,"media\alien 1.fx",1
scale object 5,150,150,150
scale object 6,150,150,150
texture object 7,2
scale object 7,15500,15000,15500
MAKE OBJECT PLAIN 1, 700,530
POSITION OBJECT 1,0,0,0
XROTATE OBJECT 1,-90
TEXTURE OBJECT 1,1
menu:
Rem *****************************************************************************************
Rem ******** MENU TEXT COLAR *********
Rem *****************************************************************************************
Global Standard : Standard = RGB(255,255,255)
Global Selected : Selected = RGB(255,50,50)
Rem *****************************************************************************************
Rem ******** MENU LOOP *********
Rem *****************************************************************************************
Do
LOOP OBJECT 5,0,500:set object speed 5,40
LOOP OBJECT 6,0,550:set object speed 6,60
LOOP OBJECT 8,0,750:set object speed 8,60
position object 6,100,0,-100
position object 8,50,0,-40
position camera 0,0,75,-350
text 215,150,"THE NEXT IN LINE,ZORK"
while HyperLink(250,200,"New Game") = 1
gosub levilone
return
endwhile
while HyperLink(250,250,"Load Game") = 1
gosub save
return
endwhile
If HyperLink(250,300,"Exit Game") = 1 Then end
loop music 5
Loop
NewGame:End
Loadgame:End
Rem *****************************************************************************************
Rem ******** MENU Functions FOR HYPERLINK *********
Rem *****************************************************************************************
Function HyperLink(X,Y,String$)
If MouseX() > X And MouseX() < X + Text Width(String$) And MouseY() > Y And MouseY() < Y + Text Height(String$)
Ink Selected,0
Text X,Y,String$
Click = MouseClick()
Else
Ink Standard,0
Text X,Y,String$
Click = 0
EndIf
EndFunction Click
save:
Rem *****************************************************************************************
Rem ******** menu save load *********
Rem *****************************************************************************************
do
LOOP OBJECT 5,0,500:set object speed 5,40
LOOP OBJECT 6,0,550:set object speed 6,60
LOOP OBJECT 8,0,750:set object speed 8,60
position object 6,100,0,-100
position object 8,50,0,-40
position camera 0,0,75,-350
If HyperLink(250,150,"save") = 1 Then Goto NewGame
If HyperLink(250,200,"load game") = 1 Then Goto NewGame
If HyperLink(250,250,"Back") = 1 Then Goto menu
loop
levilone:
delete object 7
delete object 5
delete object 6
delete object 8
delete object 1
delete image 1
delete image 2
delete music 5
delete effect 1
cls
dweeb