Difference between revisions of "Message"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(→‎Examples: I think it makes more sense to have the code in codeboxes and the message in plaintext (care was taken to preserve spaces in the plaintext, though they are somewhat difficult to see))
imported>DragoonWraith
(→‎Examples: lacked variables)
Line 23: Line 23:
===Examples===
===Examples===


  Message "Var1:% 5.2f / Var2:% 5.2f"
  Message "Var1:% 5.2f / Var2:% 5.2f" Var1 Var2
'''"Var1:   123.45 / Var2:  -123.45"'''
'''"Var1:   123.45 / Var2:  -123.45"'''


----
----


  Message "Var1:%05.2f / Var2:%05.2f"
  Message "Var1:%05.2f / Var2:%05.2f" Var1 Var2
'''"Var1: 00123.45 / Var2:-00123.45"'''
'''"Var1: 00123.45 / Var2:-00123.45"'''


----
----


  Message "Var1:%+-5.0f / Var2:%+-5.0f"
  Message "Var1:%+-5.0f / Var2:%+-5.0f" Var1 Var2
'''"Var1:+123   / Var2:-123  "'''
'''"Var1:+123   / Var2:-123  "'''


----
----


  Message "Var1:% .3e / Var2:% .3e
  Message "Var1:% .3e / Var2:% .3e" Var1 Var2
'''"Var1: 1.234E+2 / Var2:-1.234E+2"'''
'''"Var1: 1.234E+2 / Var2:-1.234E+2"'''



Revision as of 14:46, 12 August 2006

Description

Syntax:

Message "Message text", [var1], [var2], DisplaySeconds 

Example:

Message "This is a Message" 
Message "You have %.0f hours to complete your task.", GameHour, 10 

Displays a message on the screen for a specified amount of game time.

The DisplaySeconds parameter must be an integer.

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


Displaying Variables

Template:MessageFormating


Examples

Message "Var1:% 5.2f / Var2:% 5.2f" Var1 Var2

"Var1:   123.45 / Var2:  -123.45"


Message "Var1:%05.2f / Var2:%05.2f" Var1 Var2

"Var1: 00123.45 / Var2:-00123.45"


Message "Var1:%+-5.0f / Var2:%+-5.0f" Var1 Var2

"Var1:+123   / Var2:-123  "


Message "Var1:% .3e / Var2:% .3e" Var1 Var2

"Var1: 1.234E+2 / Var2:-1.234E+2"

See Also

MessageBox
GetButtonPressed