Background for Skyrim SE
Member of the Message script
intfunctionShow(floatafArg1=0.0, floatafArg2=0.0, floatafArg3=0.0, floatafArg4=0.0, floatafArg5=0.0, floatafArg6=0.0, floatafArg7=0.0, floatafArg8=0.0, floatafArg9=0.0)Native

Description

Wiki Description

Displays the message to the screen, substituting the passed-in numbers into the appropriate spots in the text. If the message is set to display in a message box, the function waits for the user to press a button and returns which button they hit.

Documentation Comment

Show this message on the screen, substituting the values as appropriate. If a message box, it will wait until the user closes the box
before returning - returning the button the user hit. If not a message box, or something went wrong, it will return -1


Caveats

CK Wiki - Notes

To designate where to put the numbers in the message in the editor, the following format is used:

%[flags][width][.precision]f

If you want the message to contain a % sign, then you must use a double % sign like so:

%%

These arguments do not appear to work on buttons.

Flags

Flags is one or more of the following characters:

CharacterMeaningDefault
-Left-align the numberRight-align the number
+Prefix the number with a + or - signPrefix only negative numbers with a - sign
0If width is prefixed with a 0, 0s are added until the minimum width is reached. If both 0 and – flags appear, the 0 is ignored.No padding is used
<Space>Prefix the value with a space if the output value is signed and positive. This flag is ignored if both the space and + flags appear.No space appears
#Forces the number to have a decimal point.Decimal point appears only if numbers follow it.

Width

This is an optional number that specifies the minimum number of characters to output. This includes the sign character (+ or -) and the decimal point, if any.

Precision

This value specifies the number of digits after the decimal point. If a decimal point appears, there is always at least one digit before it. The value is rounded to the appropriate number of digits.

The default precision is 6. If precision is 0, or if the period appears without a number following it, no decimal point is printed.

Examples

Values:

5
1.1
-0.523456745

"%f" results in:

5.0
1.1
-0.523457

"%.0f" results in:

5
1
-1

"%+05f" results in:

+0005
+01.1
-0.523457

"%10.2f" results in:

      5.00
      1.10
     -0.52

Parameters

  1. floatafArg1=0.0

    CK Wiki Description

    The number to substitute into the first spot in the text.

  2. floatafArg2=0.0

    CK Wiki Description

    The number to substitute into the second spot in the text.

  3. floatafArg3=0.0

    CK Wiki Description

    The number to substitute into the third spot in the text.

  4. floatafArg4=0.0

    CK Wiki Description

    The number to substitute into the fourth spot in the text.

  5. floatafArg5=0.0

    CK Wiki Description

    The number to substitute into the fifth spot in the text.

  6. floatafArg6=0.0

    CK Wiki Description

    The number to substitute into the sixth spot in the text.

  7. floatafArg7=0.0

    CK Wiki Description

    The number to substitute into the seventh spot in the text.

  8. floatafArg8=0.0

    CK Wiki Description

    The number to substitute into the eighth spot in the text.

  9. floatafArg9=0.0

    CK Wiki Description

    The number to substitute into the ninth spot in the text.


Examples

; Display a simple message to the user
HelloWorld.Show()
; Display a message, replacing the first number with a 10
YouGotGold.Show(10.0)
;/ Display a message, replacing the second number with a 10, the third number with a 20 (leaving first 0), and getting
   the button the user hit /;
int ibutton = YetAnotherMessage.Show(0.0, 10.0, 20.0)

Auto-Generated Example

float myFloat__afArg1
float myFloat__afArg2
float myFloat__afArg3
float myFloat__afArg4
float myFloat__afArg5
float myFloat__afArg6
float myFloat__afArg7
float myFloat__afArg8
float myFloat__afArg9

int returnedValue = myMessage__toCallFunctionOn.Show(myFloat__afArg1, myFloat__afArg2, myFloat__afArg3, myFloat__afArg4, myFloat__afArg5, myFloat__afArg6, myFloat__afArg7, myFloat__afArg8, myFloat__afArg9)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.