Deleted11438360User Posted May 5, 2016 Share Posted May 5, 2016 (edited) http://wiki.tesnexus.com/index.php/Skyrim_Messagebox_Menu_Tutorial So that is an example from the Nexus Wiki. What I would like to do is learn how to add another menu with a yes or no button inside one of the buttons. So if I chose button 1, it would pop up a menu asking me if I am sure and want to go ahead. If I click yes it would do stuff, but if I click no, it would obviously cancel. What is the best way to set this up? My head is currently spinning with all the other stuff I have had to learn. It's going okay though! Many thanks everyone! Edit: I want my script to extend an ObjectReference. Edited May 5, 2016 by Guest Link to comment Share on other sites More sharing options...
skinnytecboy Posted May 5, 2016 Share Posted May 5, 2016 Well, I just call a second message with yes option. It works for me. Script wise, use states and perhaps a global to dictate which message gets displayed with each choice Link to comment Share on other sites More sharing options...
Deleted11438360User Posted May 5, 2016 Author Share Posted May 5, 2016 (edited) Thank you. Could you perhaps do a quick example please? I'm a very visual person and that is how I learn and keep it in my noggin'. A very quick one-button option would be fine. My problem is knowing how I should lay it out correctly, as I have seen a few different ways to do menus. Sorry for my stupidity! :laugh: Edit: I'll have a menu with various options like so: if Button 0;Cancel elseif Button 1Do stuff So I need Button 1 to pop up another menu that says "Are you sure/ Y/N" and then stuff will happen on yes, but no will cancel the whole menu. Edited May 5, 2016 by Guest Link to comment Share on other sites More sharing options...
FrankFamily Posted May 5, 2016 Share Posted May 5, 2016 (edited) Check this: http://www.creationkit.com/index.php?title=Options_MenuThe second from the bottom is pretty much what you want, a menu with sub-options, and it's worth reading the bottom of the discussion tab too. Edited May 5, 2016 by FrankFamily Link to comment Share on other sites More sharing options...
Deleted11438360User Posted May 5, 2016 Author Share Posted May 5, 2016 Great Frank. I spliced it together, but I'm not sure about something... I basically do this: Function Menu(int Button = 0)Button = MessageMenu.Show() And then in one of the button options, I link to this: Function Menu2(int Button = 0)Button = MessageBody.Show() My question is... Would I need to change the int in Menu2 to something different, or can I reuse that like I have been doing? Does it matter? Link to comment Share on other sites More sharing options...
FrankFamily Posted May 5, 2016 Share Posted May 5, 2016 (edited) You don't need two functions, as you can see in the "Menu with sub-options" within the checks for the buttons pressed of the main menu you show the sub-options adn check the button that was pressed recycling the aibutton variable. Something like this may work, removed "If aiButton != -1" since in the discussion tab they say it's not needed sicne papyrus jusy waits for show to return.Function Menu(Bool abMenu = True, Int aiButton = 0) While abMenu aiButton = MainMenuMESG.Show() ; Main Menu If aiButton == 0 ; option 1 aiButton = Confirmation.Show() If aiButton == 0 ; yes ;so something ElseIf aiButton == 1 ; no EndIf ElseIf aiButton == 1 ; option 2 aiButton = Confirmation.Show() If aiButton == 0 ; yes ;do something else ElseIf aiButton == 1 ; no EndIf EndIf EndWhile EndFunctionEDIT: actually if you don't want to include a "back" button or something like that the while might be unnecessary, so maybe this works:Function Menu(Int aiButton = 0) aiButton = MainMenuMESG.Show() ; Main Menu abMenu = False ; End the function If aiButton == 0 ; option 1 aiButton = Confirmation.Show() If aiButton == 0 ; yes ;do something ElseIf aiButton == 1 ; no ; EndIf ElseIf aiButton == 1 ; cancel ;do nothing at all? EndIf EndFunction Edited May 5, 2016 by FrankFamily Link to comment Share on other sites More sharing options...
skinnytecboy Posted May 5, 2016 Share Posted May 5, 2016 Here's a small (snigger) example of a script cast via dialogue that spawns several messages Reveal hidden contents Scriptname SKQWBMessageScript extends Quest Message Property SKQCHMB1 Auto Message Property SKQCHMB2 Auto Message Property SKQCHMB3 Auto Message Property SKQCHMB4 Auto Message Property SKQCHMB5 Auto Message Property SKQCHMB6 Auto Quest Property SKQChekrenControl Auto Sound Property SKQFishPopSM Auto Int Button Function Message1() ; GoToState("ShowMGS1") EndFunction Function Message2() ; What, are you afraid of a little fishy? GoToState("ShowMGS2") EndFunction Function Message3() ; But this is a special little fishy, won't you try it? GoToState("ShowMGS3") EndFunction Function Message4() ; You're just being awkward on purpose now aren't you? GoToState("ShowMGS4") EndFunction Function Message5() ; What! I bet you're the type of person who reads the last page of a book first aren't you? GoToState("ShowMGS5") EndFunction Function Message6() ; Then let's get on with it then shall we? GoToState("ShowMGS6") EndFunction State ShowMGS1 Event OnBeginState() Button = SKQCHMB1.show() if Button == 0 SKQFishPopSM.Play(Game.GetPlayer()) Utility.Wait(1) SKQChekrenControl.SetStage(50) elseif Button == 1 Message2() EndIf EndEvent EndState State ShowMGS2 Event OnBeginState() Button = SKQCHMB2.show() if Button == 0 Message3() elseif Button == 1 SKQFishPopSM.Play(Game.GetPlayer()) Utility.Wait(1) SKQChekrenControl.SetStage(50) EndIf EndEvent EndState State ShowMGS3 Event OnBeginState() Button = SKQCHMB3.show() if Button == 0 SKQFishPopSM.Play(Game.GetPlayer()) Utility.Wait(1) SKQChekrenControl.SetStage(50) elseif Button == 1 Message4() EndIf EndEvent EndState State ShowMGS4 Event OnBeginState() Button = SKQCHMB4.show() if Button == 0 Message5() elseif Button == 1 Message5() EndIf EndEvent EndState State ShowMGS5 Event OnBeginState() Button = SKQCHMB5.show() if Button == 0 Message6() elseif Button == 1 Message6() EndIf EndEvent EndState State ShowMGS6 Event OnBeginState() Button = SKQCHMB6.show() if Button == 0 SKQFishPopSM.Play(Game.GetPlayer()) Utility.Wait(1) SKQChekrenControl.SetStage(50) elseif Button == 1 Debug.Notification("The show must go on") Utility.Wait(2) SKQFishPopSM.Play(Game.GetPlayer()) Utility.Wait(1) SKQChekrenControl.SetStage(50) EndIf EndEvent EndState Link to comment Share on other sites More sharing options...
Deleted11438360User Posted May 5, 2016 Author Share Posted May 5, 2016 Thank you everyone, appreciate it. Link to comment Share on other sites More sharing options...
Recommended Posts