Jump to content

how too make a menu script using Papyrus


stonefly

Recommended Posts

  • 2 years later...

I have tried this script, but I only get one button, I added the utility.wait thinking something at startup was interfearing, but is the same thing, only one button, and one message "you hit button 1"

 

Here is code

Scriptname GGMyFirstScript extends Quest  

{displays a multiple choice menu}
message property GGMyFirstScriptMessage auto                 ;;declare your properties/variabels
quest property MyMenuQuest auto

event OnInit()                                            ;;begins when script or its parent quest gets initialized

int ibutton = GGMyFirstScriptMessage.show()                   ;;shows the message item
    Utility.Wait(5.0)
       if ibutton == 0                                    ;; 0 is the first button, 1 the second, and so on
               debug.messagebox("you hit button 1")       ;;replace with whatever result function you like

       elseif ibutton == 1
               debug.messagebox("you hit button 2")

       else
               debug.messagebox("you didnt hit button 1 or 2 hence must have hit 3")

       endif

MyMenuQuest.stop()                                        ;;stops the quest
endEvent

Would like to know what i did wrong.

Edited by taglag
Link to comment
Share on other sites

  • Recently Browsing   0 members

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