Message Box proper usageformatting?

Post » Mon Jun 18, 2012 7:49 am

I want to add a message box with multiple options. I can do the box fine, but where I'm completely stumped is how to retrieve the index number of a button in the box, for use later in the script. As far as I can tell this is the example, creationkit[dot]com/Show_-_Message but I don't even know where to begin, the examples dont seem to show a complete usage, including outcomes. or maybe its just me.

Any help is appreciated! thanks.
User avatar
Curveballs On Phoenix
 
Posts: 3365
Joined: Sun Jul 01, 2007 4:43 am

Post » Mon Jun 18, 2012 8:31 am

You'd want a line like the following in your script:

int response = myMessage.ShowMessage()

Where myMessage is a Message property with your message assigned to it in the editor. When the message is shown, the script will wait for the user to press a button. The index of the button pressed will be assigned to the "response" variable, and your script will resume executing. It'll be 0 for the first button, 1 for the second, etc.
User avatar
Dylan Markese
 
Posts: 3513
Joined: Sat Dec 01, 2007 11:58 am

Post » Mon Jun 18, 2012 9:50 am

Thanks ill give it another go

EDIT: Works great
User avatar
MatthewJontully
 
Posts: 3517
Joined: Thu Mar 08, 2007 9:33 am

Post » Mon Jun 18, 2012 9:50 am

Slight amendment: the function name is http://www.creationkit.com/Show_-_Message, not ShowMessage.

Cipscis
User avatar
Ezekiel Macallister
 
Posts: 3493
Joined: Fri Jun 22, 2007 12:08 pm

Post » Sun Jun 17, 2012 6:22 pm

Woops, I knew that :facepalm:
User avatar
RaeAnne
 
Posts: 3427
Joined: Sat Jun 24, 2006 6:40 pm

Post » Sun Jun 17, 2012 10:24 pm

EDIT:

you need a

GlobalVariable Property  auto

at the beginning however it didnt state this on the page. and i didnt realise there was a specific one for Globals
User avatar
Sarah Kim
 
Posts: 3407
Joined: Tue Aug 29, 2006 2:24 pm

Post » Mon Jun 18, 2012 8:49 am

Maybe http://www.creationkit.com/GlobalVariable_Script will help?
User avatar
Fanny Rouyé
 
Posts: 3316
Joined: Sun Mar 25, 2007 9:47 am


Return to V - Skyrim