Difference between revisions of "MessageBox"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Mmmpld
m (Added indication of maximum 10 variables in MessageBox)
imported>Mmmpld
m (Max var changed from 10 to 9 based on testing)
Line 9: Line 9:
If no button is specified, a default button of "Done" will be displayed on the message box.  
If no button is specified, a default button of "Done" will be displayed on the message box.  


Up to 10 variable names can also be passed into the message box. These are displayed in the order they are used as parameters. The message must specify how the variable is to be displayed.  
Up to 9 variable names can also be passed into the message box. These are displayed in the order they are used as parameters. The message must specify how the variable is to be displayed.  


Formatting notation:  
Formatting notation:  

Revision as of 23:48, 5 April 2006

Syntax:

MessageBox "Message", [var1], [var2], ["button1"], ["button2"] 

Example:

MessageBox "This is a Message" 
MessageBox "Shall I start to spin? GameHour = %.2f", GameHour, "OK", "No Way" 

Displays a message on the screen, which can be formatted, as well as user-definable buttons that the player can choose. The message box stops time and displays itself in the center of the screen until the player chooses an option. This option can be captured in a script by using the GetButtonPressed function.

If no button is specified, a default button of "Done" will be displayed on the message box.

Up to 9 variable names can also be passed into the message box. These are displayed in the order they are used as parameters. The message must specify how the variable is to be displayed.

Formatting notation:

%.2f

This means format the variable with 2 decimal places.

%.0f

This will format the variable with 0 decimal places, so is the normal choice for integers.

See Also

Message
GetButtonPressed