Meteor 2 Scripting Functions
UI
void gameMessage(string text)
Display a game message (local only).

Example
gameMessage("This is a game message");

Comments
none

See also
introMessage messageBox print logPrint

void introMessage(string text)
Display an intro message (local only).

Example
introMessage("This is a intro message");

Comments
Intro messages are displayed near the bottom of the screen and fade out after around 8 seconds.

See also
gameMessage messageBox print logPrint

void messageBox(string text)
Display a message box (local only).

Example
messageBox("This is a message box");

Comments
none

See also
gameMessage confirmBox

bool confirmBox(string text)
Display a confirmation box with message (local only).

Example
if(confirmBox("Are you sure?"))
{
    print("You are sure");
}

Comments
none

See also
messageBox stringInputBox

bool stringInputBox(string str, int maxLen, string message)
Display a string input box with message (local only).

Example
string name = "";
if(stringInputBox(name, 32, "Enter your name"))
{
    print("Your name is " + name);
}

Comments
none

See also
messageBox stringInputBox

bool createToolbar(int toolbarNumber, string title, vector2 screenPos, bool docked)
Create a toolbar ( (local only).

Example
createToolbar(0, "Test Toolbar", vector2(10, 10), false);

Comments
toolbarNumber should simply be unique number that refers to this toolbar.
docked toolbars cannot be moved.
See base\maps\examples\Text_Toolbar.as for a working example.

See also
deleteToolbar addToolbarButton

void deleteToolbar(int toolbarNumber, bool localOnly)
Delete a toolbar and all associated buttons (local only).

Example
deleteToolbar(0);

See also
createToolbar addToolbarButton

void addToolbarButton(int toolbarNumber, string caption, string imageFilename, string triggerText)
Add a button to an existing toolbar (local only).

Example
addToolbarButton(0, "Sheep", "objects\\sheep01_01.png", "print(\"You pressed the sheep button\");");

Comments
toolbarNumber is the unique toolbar number to add the button to.
imageFilename must be image filename from within an INI file from the images folder.

See also
addToolbarSeparator createToolbar

void addToolbarSeparator(int toolbarNumber)
Add a separator to an existing toolbar (local only).

Example
addToolbarSeparator(0);

See also
addToolbarButton createToolbar

void openInteractionMenu(int menuIndex)
Open specified interaction menu.

Example
// open root interaction menu
openInteractionMenu(0);


Index

Generated on the 24 June 2024 at 06:55:38 (UK Time)