MadNuttah Posted December 12, 2010 Share Posted December 12, 2010 Hello, I'm trying to get menus to work. As a start I am testing with GECK Wiki. scn TestQuestSCRIPT short MenuOpen short Button Begin Gamemode set MenuOpen to 1 showmessage TestMessage ;StopQuest TestQuest end begin MenuMode if MenuOpen == 1 set Button to GetButtonPressed if Button == -1 Return elseif Button == 0 showmessage TestMessageYes elseif Button == 1 showmessage TestMessageNo endif endif end I can't get it to select an option. What's the problem? Many thanks again. Link to comment Share on other sites More sharing options...
davidlallen Posted December 12, 2010 Share Posted December 12, 2010 Did you paste the exact code you are using? The wiki you point to says the first block should be "begin onactivate" and the second one should be "begin gamemode". I have used the style in the wiki you point to and it is working for me. Link to comment Share on other sites More sharing options...
thc1234 Posted December 12, 2010 Share Posted December 12, 2010 Your menumode block is run when message is displayed, not after button is pressed.place Your menu action response code into gamemode block, that is begin gamemode if menuopen == 0 showmessage testmessage set menuopen to 1 elseif menuopen == 1 set menuopen to 2 set button to getbuttonpressed if button == 0 showmessage testmessageyes elseif button == 1 showmessage testmessageno else set menuopen to 1 endif endif end Link to comment Share on other sites More sharing options...
MadNuttah Posted December 12, 2010 Author Share Posted December 12, 2010 Thanks, both. It has to be placed in begin gamemode. Link to comment Share on other sites More sharing options...
Recommended Posts