Console

More...

Classes:

class

Essentially a SimGroup, but with onAdd and onRemove script callbacks.

class

A script-level OOP object which allows binding of a class, superClass and arguments along with declaration of methods.

class

A ScriptObject that responds to tick and frame events.

class

A collection of SimObjects that are owned by the group.

class

Base class for almost all objects involved in the simulation.

class

A collection of SimObjects.

Functions

void
cls()

Clears the console output.

void
debugEnumInstances(string className, string functionName)

Call the given function for each instance of the given class.

bool
dumpEngineDocs(string outputFile)

Dumps the engine scripting documentation to the specified file overwriting any existing content.

Create a XML document containing a dump of the entire exported engine API.

string
getCategoryOfClass(string className)

Returns the category of the given class.

string
getDescriptionOfClass(string className)

Returns the description string for the named class.

bool
isClass(string identifier)

Returns true if the passed identifier is the name of a declared class.

bool
isMemberOfClass(string className, string superClassName)

Returns true if the class is derived from the super class.

bool
isValidObjectName(string name)

Return true if the given name makes for a valid object name.

loadObject(string filename)

Loads a serialized object from a file.

bool
saveObject(SimObject object, string filename)

Serialize the object to a file.

Variables

string

The group that objects will be added to when they are created.

bool

Determines whether to send output to the platform's "debug" system.

bool

If true, the log buffer will be enabled.

int

If greater than zero then it counts the number of object creation failures based on a missing copy object and does not report an error..

int

This is deprecated.

bool

If true a date and time will be prepended to every console message.

bool

If true a timestamp is prepended to every console message.

bool

If true, a warning will be displayed in the console whenever a undefined variable is used in script.

Detailed Description

Functions

cls()

Clears the console output.

debugEnumInstances(string className, string functionName)

Call the given function for each instance of the given class.

Parameters:

className

Name of the class for which to enumerate instances.

functionName

Name of function to call and pass each instance of the given class.

note:

This function is only available in debug builds and primarily meant as an aid in debugging.

dumpEngineDocs(string outputFile)

Dumps the engine scripting documentation to the specified file overwriting any existing content.

Parameters:

outputFile

The relative or absolute output file path and name.

return:

Returns true if successful.

exportEngineAPIToXML()

Create a XML document containing a dump of the entire exported engine API.

return:

A SimXMLDocument containing a dump of the engine's export information or NULL if the operation failed.

getCategoryOfClass(string className)

Returns the category of the given class.

Parameters:

className

The name of the class.

getDescriptionOfClass(string className)

Returns the description string for the named class.

Parameters:

className

The name of the class.

return:

The class description in string format.

isClass(string identifier)

Returns true if the passed identifier is the name of a declared class.

isMemberOfClass(string className, string superClassName)

Returns true if the class is derived from the super class.

If either class doesn't exist this returns false. Parameters:

className

The class name.

superClassName

The super class to look for.

isValidObjectName(string name)

Return true if the given name makes for a valid object name.

Parameters:

name

Name of object

return:

True if name is allowed, false if denied (usually because it starts with a number, _, or invalid character

loadObject(string filename)

Loads a serialized object from a file.

Parameters:

Name

and path to text file containing the object

saveObject(SimObject object, string filename)

Serialize the object to a file.

Parameters:

object

The object to serialize.

filename

The file name and path.

Variables

string $instantGroup 

The group that objects will be added to when they are created.

bool alwaysUseDebugOutput 

Determines whether to send output to the platform's "debug" system.

note:

This is disabled in shipping builds.

bool logBufferEnabled 

If true, the log buffer will be enabled.

int objectCopyFailures 

If greater than zero then it counts the number of object creation failures based on a missing copy object and does not report an error..

int printLevel 

This is deprecated.

It is no longer in use and does nothing.

bool useRealTimestamp 

If true a date and time will be prepended to every console message.

bool useTimestamp 

If true a timestamp is prepended to every console message.

bool warnUndefinedVariables 

If true, a warning will be displayed in the console whenever a undefined variable is used in script.