Papyrus show a menu?

Post » Tue Jun 19, 2012 12:39 pm

I'm making a nice little home beneath the Arch of Solitude, and I wanted to have a cool Amulet inside the house. The Amulet is supposed to show a menu when equipped, but I don't know that code. Can somebody just show me the code to use to show a menu with more than one option?

Thanks,
~L
User avatar
Victoria Bartel
 
Posts: 3325
Joined: Tue Apr 10, 2007 10:20 am

Post » Tue Jun 19, 2012 2:23 pm

ScriptName YourAmuletScript extends ObjectReferenceMessage Property YourOptionsMESG AutoEvent OnEquipped(Actor akActor)	If akActor == Game.GetPlayer()		Int iButton = YourOptionsMESG.Show() ; Choices printed in MessageBox buttons		If (iButton != -1)			If (iButton == 0) ; 1'st button				; Do Stuff			ElseIf (iButton == 1)				; Do other stuff			ElseIf (iButton == 2)				; etc.			ElseIf (iButton == 3)			ElseIf (iButton == 4)			ElseIf (iButton == 5)			ElseIf (iButton == 6)			ElseIf (iButton == 7)			ElseIf (iButton == 8)			ElseIf (iButton == 9) ; 10'th button			EndIf		EndIf	EndIf	EndEvent
User avatar
Stefanny Cardona
 
Posts: 3352
Joined: Tue Dec 19, 2006 8:08 pm

Post » Tue Jun 19, 2012 4:58 am

Thanks!
One question, though:
Do I add arguments into the .Show() function to name the buttons?
User avatar
Greg Cavaliere
 
Posts: 3514
Joined: Thu Nov 01, 2007 6:31 am

Post » Tue Jun 19, 2012 10:41 am

I have a question about messageboxes also
I want to implement a "stat" window that the player can call up and see various script variables.
I'm guessing showing a variable works just like the debug functions, but what do you think mya be the best way for the player to call up the messagebox. ?
It would of course need to always and easily be accessible.
User avatar
Kate Norris
 
Posts: 3373
Joined: Mon Nov 27, 2006 6:12 pm

Post » Tue Jun 19, 2012 3:42 am

Locoforcoco9: You can add them to a Message form, then even conditionalize the buttons so they'll only show when appropriate.

bootliquor: Maybe a scripted note with an http://www.creationkit.com/OnRead_-_ObjectReference event?
User avatar
saharen beauty
 
Posts: 3456
Joined: Wed Nov 22, 2006 12:54 am

Post » Tue Jun 19, 2012 4:50 am

Okay... um... This is my first day with Papyrus... sorry...
Could you point me to a page that has an example...?
User avatar
Rhysa Hughes
 
Posts: 3438
Joined: Thu Nov 23, 2006 3:00 pm

Post » Tue Jun 19, 2012 8:44 am

Here's the http://www.creationkit.com/Show_-_Message page. The template above should work, but you have to make a *YourOptionsMESG, then fill in the buttons with your options. When pressed, the corresponding code will fire.

*be sure to point the property of the amulet to your message
User avatar
Jordan Moreno
 
Posts: 3462
Joined: Thu May 10, 2007 4:47 pm


Return to V - Skyrim