Need help with a scripting issue

Post » Sun May 27, 2012 3:10 am

I haven't used papyrus langue much yet but I already faced a problem with it and can't find answer for it on the creation kit wiki. With previous language creating a message box with a few buttons was easy to do but now it seems that all message boxes I create with papyrus have only one button ("OK"). What I need to do to create Message box with a few buttons? (Or if it's not possible how can I make a misc item to enter in dialogue mode with player?)
User avatar
Heather Stewart
 
Posts: 3525
Joined: Thu Aug 10, 2006 11:04 pm

Post » Sun May 27, 2012 7:16 am

Create a Message form and display it with http://www.creationkit.com/Show_-_Message. You can add up to ten buttons, each with conditions if desired.

This thread should really be in the CK forum.
User avatar
James Smart
 
Posts: 3362
Joined: Sun Nov 04, 2007 7:49 pm

Post » Sun May 27, 2012 1:59 pm

Create a Message form and display it with http://www.creationkit.com/Show_-_Message. You can add up to ten buttons, each with conditions if desired.

This thread should really be in the CK forum.
Thanks for help. And sorry, I didn't notice that there's CK forum separated from mods forum.
User avatar
Manny(BAKE)
 
Posts: 3407
Joined: Thu Oct 25, 2007 9:14 am

Post » Sun May 27, 2012 12:45 am

Reading that article about Show gave me better view on this issue but because there wasn't any example scripts about those message boxes with Show I'm still wondering how to build the script I'm doing. If someone would mind to translate this simple Oblivion script to papyrus it will greatly help me on learning how the papyrus works.


ScriptName SpecialSackScript

Short button

Begin OnActivate
MessageBox "What you want to do?", "Take", "Open"
End

Begin on gamemode
Set button to GetButtonPressed
If ( button == 0 )
Activate
ElseIf ( button == 1)
Specialsack.Activate player 1
EndIf
End
User avatar
mollypop
 
Posts: 3420
Joined: Fri Jan 05, 2007 1:47 am

Post » Sun May 27, 2012 10:03 am

ScriptName SpecialSackScript extends ObjectReferenceMessage Property YourMESG AutoEvent OnActivate(ObjectReference akActionRef)	Int iButton = YourMESG.Show()	If iButton == 0		; Take	ElseIf iButton == 1		; Open	EndIfEndEvent
User avatar
suzan
 
Posts: 3329
Joined: Mon Jul 17, 2006 5:32 pm

Post » Sun May 27, 2012 4:09 am

Along with the amazing JustinOther's script above, you'll have to make a http://www.creationkit.com/Message object, as shown here:

http://1.bp.blogspot.com/-t75IBPJOrKk/T6KuMdaHiyI/AAAAAAAAAZM/8JkgoejjRDc/s1600/YourMESG.png

Edit: Need to find a better way to post images! :)
User avatar
Cheville Thompson
 
Posts: 3404
Joined: Sun Mar 25, 2007 2:33 pm


Return to V - Skyrim