Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

[SKY] Creating a nested menu - what the heck am I doing wrong?


andrewmyles
 Share

Recommended Posts

Okay, so I am trying to create a cheat menu for my mod, so I can choose many options by reading a book. Standard stuff.

There are more than 10 options, so I need to make more than one menu. The last item in menu 1 is "next", which should bring the menu2, element 0 in menu2 is "previous", which would bring back menu1 and so for.

 

 

The code looks something like that:

Scriptname CheatBookScript extends ObjectReference  

Message Property Menu1 Auto
Message Property Menu2 Auto


Event OnRead()
    Menu1()
EndEvent

Function Menu1(int aibutton = 0)
    aibutton=Menu1.show()
    if aibutton==0

    elseif aibutton ==1
;options 2-8 here...


    elseif aibutton ==9
        Menu2()
    EndIf

EndFunction

Function Menu2(int aibutton2 = 0)
    aibutton2=Menu2.show()
    if aibutton2==0
menu1()
    elseif aibutton2 ==1
;options 2-8 here...

    elseif aibutton2 ==9

    EndIf

EndFunction

Except, it doesn't work. When I click the "next" button, the game does nothing, staying in menu1. Why?

Edited by andrewmyles
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...