MessageBoxEx

From the Oblivion ConstructionSet Wiki
Revision as of 04:23, 27 January 2008 by imported>Haama (Created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A command for Oblivion Script Extender

Syntax:

(nothing) MessageBoxEX "formatString:string" var1 var2 ... var20

Displays a formatted MessageBox using the extended format specifiers. Format specifiers may appear within buttons. Button text should be included within the format string, separated by the pipe character |.

Example

Note that due to wiki limitations, the MessageboxEX line has been split into two

    ref refVar1
    ref refVar2
    short keyCode
    short goldCost
...
    set refVar1 to AdrianDecanusREF
    set refVar2 to ShadySamREF
    set keyCode to GetControl 15 ; menu key, assuming 'Tab' (15)
    set goldCost to 500

    MessageBoxEX "Press %k to summon a companion %rCost: %g gold|%n|%n|Cancel"
                 keyCode goldCost refVar1 refVar2

prints out

    Press TAB to summon a companion
            Cost: 500 gold
           [Adrian Decanus]
              [Shady Sam]
               [Cancel]

Notes

  • As well as the normal variable types, several new variables types have been added:
    • %i - prints the formID of a reference or object
    • %k - prints a string representing the key associated with a DirectInput scan code
    • %n - prints the name of a reference or object
    • %r - prints a newline
    • %c - prints the name of a component within another object. Takes two arguments - an object (ref) and the index of the component you want to access (short). Supported object types:
      • Magic Item - prints the name of the nth effect item.
      • Faction - prints the male rank title of the nth rank.

See Also