Inherits ConsoleObject.
Inherited by ActionMap, AssetBase, AssetManager, AssetQuery, AssetTagsManifest, BehaviorInstance, BehaviorTemplate, ConsoleLogger, EventManager, FileDialog, FileObject, ModuleManager, ParticleAssetEmitter, PickingSceneController, PopupMenu, RemoteDebuggerBase, RenderProxy, SceneObjectSet, SimComponent, SimSet, SimXMLDocument, StreamObject, Taml, UndoManager, and ZipObject.
|
| static S32 QSORT_CALLBACK | compareFields (const void *a, const void *b) |
| |
| string call |
( |
functionName |
, |
|
|
[args] * |
|
|
) |
| |
Dynamically call a method on an object.
| int clone |
( |
[bool copyDynamicFields? = false] ? |
| ) |
|
Clones the object.
- Parameters
-
| copyDynamicFields | Whether the dynamic fields should be copied to the cloned object or not. Optional: Defaults to false. |
- Returns
- (newObjectID) The newly cloned object's id if successful, otherwise a 0.
| static S32 QSORT_CALLBACK compareFields |
( |
const void * |
a, |
|
|
const void * |
b |
|
) |
| |
|
static |
Use the delete method to delete this object. When an object is deleted, it automatically: Unregisters its ID and name (if it has one) with the engine. Removes itself from any SimGroup or SimSet it may be a member of. (eventually) returns the memory associated with itself and its non-dynamic members. Cancels all pending obj.schedule() events. For objects in the GameBase, ScriptObject, or GUIControl hierarchies, an object will first: Call the onRemove() method for the object's namespace
- Returns
- No return value.
Use the dump method to display the following information about this object: All engine and script registered console methods (including parent methods) for this object, all Non-Dynamic Fields AND all Dynamic Fields
- Returns
- No return value
| void dumpClassHierarchy |
( |
| ) |
|
| const char* getClassName |
( |
| ) |
|
| string getClassNamespace |
( |
| ) |
|
| string getDynamicField |
( |
index |
| ) |
|
| int getDynamicFieldCount |
( |
| ) |
|
| string getField |
( |
int |
index | ) |
|
Gets the name of the field at the given index.
Gets the number of persistent fields on the object.
| const char* getFieldType |
( |
fieldName |
| ) |
|
| const char* getFieldValue |
( |
fieldName |
| ) |
|
Use the getGroup method to determine if this object is contained in a SimGroup and if so, which one.
- Returns
- Returns the ID of the SimGroup this shape is in or zero if the shape is not contained in a SimGroup
Use the getId method to get the numeric ID of this shape.
- Returns
- Returns the unique numeric ID of this shape.
- See Also
- getName, setName
Referenced by nameToID().
| string getInternalName |
( |
| ) |
|
returns the objects internal name
| string getProgenitorFile |
( |
| ) |
|
Gets the progenitor file responsible for this instances creation.
- Returns
- The progenitor file responsible for this instances creation.
| string getSuperClassNamespace |
( |
| ) |
|
Use the getType method to get the type for this object. This type is an integer value composed of bitmasks. For simplicity, these bitmasks are defined in the engine and exposed for our use as global variables. To simplify the writing of scripts, a set of globals has been provided containing the bit setting for each class corresponding to a particular type.
- Returns
- Returns a bit mask containing one or more set bits.
- See Also
- getClassName
returns true, if we are in the specified simgroup - or a subgroup thereof
| bool isMemberOfClass |
( |
string |
classname | ) |
|
returns true if this object is a member of the specified class
| bool isMethod |
( |
const char * |
methodName | ) |
|
| bool isMethod |
( |
string method |
name | ) |
|
Checks whether the periodic timer is active for this object or not.
- Returns
- Whether the periodic timer is active for this object or not.
| bool save |
( |
fileName |
, |
|
|
[selectedOnly] ? |
|
|
) |
| |
| int schedule |
( |
time |
, |
|
|
command |
, |
|
|
[arg] * |
|
|
) |
| |
Use the schedule method to schedule an action to be executed upon this object time milliseconds in the future. The major difference between this and the schedule console function is that if this object is deleted prior to the scheduled event, the event is automatically canceled. times should not be treated as exact since some 'simulation delay' is to be expected. The minimum resolution for a scheduled event is \32 ms, or one tick. schedule does not validate the existence of command. i.e. If you pass an invalid console method name, the schedule() method will still return a schedule ID, but the subsequent event will fail silently.
- Parameters
-
| time | Time in milliseconds till action is scheduled to occur. |
| command | Name of the command to execute. This command must be scoped to this object (i.e. It must exist in the namespace of the object), otherwise the schedule call will fail. |
| arg1...argN | These are optional arguments which will be passed to command. This version of schedule automatically passes the ID of obj as arg0 to command. |
- Returns
- Returns an integer schedule ID.
- See Also
- See the schedule console function and its corresponding helper functions.
| void setClassNamespace |
( |
| ) |
|
| bool setFieldValue |
( |
fieldName |
, |
|
|
value |
|
|
) |
| |
| void setInternalName |
( |
string |
InternalName | ) |
|
| void setProgenitorFile |
( |
file |
| ) |
|
Sets the progenitor file responsible for this instances creation.
- Parameters
-
| file | The progenitor file responsible for this instances creation. |
- Returns
- No return value.
| void setSuperClassNamespace |
( |
| ) |
|
| bool startTimer |
( |
callbackFunction |
, |
|
|
float |
timePeriod, |
|
|
[repeat] ? |
|
|
) |
| |
Starts a periodic timer for this object. Sets a timer on the object that, when it expires, will cause the object to execute the onTimer() callback. The timer event will continue to occur at regular intervals until setTimerOff() is called.
- Parameters
-
| callbackFunction | The name of the callback function to call for each timer repetition. |
| timePeriod | The period of time (in milliseconds) between each callback. |
| repeat | The number of times the timer should repeat. If not specified or zero then it will run infinitely |
- Returns
- No return Value.
Stops the periodic timer for this object.
- Returns
- No return Value.