I badly need help with my menu engine, I'm using LttP Menu Engine Created by Mitxela and i cant get it work correctly, I'm using GM7 and the engine is made for GM6 so thats might be the prob. OK my problem with the engine is that it keeps popping up when i try to close the menu.
Heres the code:
menuposx=84;menuposy=60 //position on screen
sound_play(wav_menu_open)
for(a=11;a>=0;a-=1){
screen_redraw()
draw_background(bg_menu,view_xport+(menuposx-24),(view_yport+menuposy)-(a*11)-20)
screen_refresh()
sleep(100/3)
}
curx=(global.item-5*(global.item div 5))-1
cury=(global.item-(global.item-5*(global.item div 5)))/5
do{
if curx<0 {curx+=5;cury-=1}
if curx>4 {curx-=5;cury+=1}
if cury<0 {cury+=4;}
if cury>3 {cury-=4;}
draw_background(bg_menu,view_xport+(menuposx-24),view_yport+(menuposy-20)) //draw the menu
for (iia=0;iia<4;iia+=1){ /*verticle lines*/ for (iib=0;iib<5;iib+=1){ /*horizontal lines*/ draw_sprite(spr_items,(iia*5)+iib,view_xport+menuposx+(iib*22),view_yport+menuposy+(iia*22))}} //draw all the items
draw_sprite(spr_selector,0,menuposx+(curx*22),menuposy+(cury*22))
screen_refresh(); keyboard_wait() //wait for input
lk=keyboard_lastkey;
if lk=vk_left or lk= vk_right or lk=vk_up or lk= vk_down sound_play(wav_menu_move)
curx-=(lk = vk_left)
curx+= (lk = vk_right)
cury-= (lk = vk_up)
cury+= (lk = vk_down)
global.item=curx+(cury*5)
} until lk = vk_escape or lk = vk_enter //until we can end
sound_play(wav_menu_close)
for(a=0;a<11;a+=1){
screen_redraw()
draw_background(bg_menu,view_xport+(menuposx-24),(view_yport+menuposy)-(a*11)-20)
screen_refresh()
sleep(100/3)
}
the code that should activate the menu code is on my player Object and I'm to lazy to print it because its just a variable change.
Please help me, i appreciate all kind of scripts, examples etc
// Jeggan