Jump to content

Menu not working


MadNuttah

Recommended Posts

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...