I need help with a simple Menu script.
I used "Wonderful☆Life's Introduction to Menus" as a base, but my Danmakufu keeps crashing after it told me that something is wrong with "enemy_script_main".
#?????e????
#Title[Some Title]
#Text[Some Text]
#Player[FREE]
#ScriptVersion[2]
script_stage_main{
let Selection=0;
let warning=0;
let alph1=150;
let alph2=150;
let alph3=150;
let alph4=0;
let alph5=0;
let MenuBG=GetCurrentScriptDirectory~"IMG\MenuBackground.png"
let Icon1=GetCurrentScriptDirectory~"IMG\Cirno.png"
let Icon2=GetCurrentScriptDirectory~"IMG\Daiyousei.png"
@Initialize{
LoadGraphic(MenuBG);
SetLife(1);
}
@MainLoop{
if(GetKeyState(VK_UP) == KEY_PUSH){Selection+=1;warning=0;}
if(GetKeyState(VK_DOWN) == KEY_PUSH){Selection-=1;warning=0;}
if(GetKeyState(VK_SHOT) == KEY_PUSH && Selection==0){warning=1;}
if(GetKeyState(VK_SHOT) == KEY_PUSH && Selection==1){warning=1;}
if(GetKeyState(VK_SHOT) == KEY_PUSH && Selection==2){ClearStage;}
}
@DrawLoop{
DrawText("Idiot",GetCenterX,GetCenterY,15,alph1);
DrawText("Triple Idiot",GetCenterX,GetCenterY-20,15,alph2);
DrawText("EXIT",GetCenterX,GetCenterY-60,15,alph3);
if(Selection==0){alph1=255; alph2=150; alph3=150;}
if(Selection==1){alph1=150; alph2=255; alph3=150;}
if(Selection==2){alph1=150; alph2=150; alph3=255;}
if(Selection==0&&warning==1;){alph4=255;}else{alph4=0;}
if(Selection==1&&warning==1;){alph5=255;}else{alph5=0;}
if(Select>2){Select=2;}
if(Select<0){Select=0;}
SetTexture(Icon1);
SetGraphicRect(0,0,128,128);
SetAlpha(aplh4);
DrawGraphic(GetCenterX-64,GetCenterY);
SetTexture(Icon2);
SetGraphicRect(0,0,128,128);
SetAlpha(aplh5);
DrawGraphic(GetCenterX-64,GetCenterY-20);
}
}
I bet it is like the most simplest thing, but I was too stupid to find it.
Also yes this was only a test to see if the options on the menu would work, If so they should display a small picture on the side of the option, when chosen, and when the option was changed it would disappear again.