TorqueScript Reference
|
Functions | |
void | cancel (eventID) |
Integer | getEventTimeLeft (eventID) |
Integer | getScheduleDuration (eventID) |
Integer | getSimTime () |
Integer | getTimeSinceStart (eventID) |
Boolean | isEventPending (eventID) |
Integer | schedule (t, objID||0, functionName, arg0,..., argN) |
void cancel | ( | eventID | ) |
cancel a previously scheduled event
eventID | The numeric ID of a previously scheduled event. |
Integer getEventTimeLeft | ( | eventID | ) |
Determines how much time remains until the event specified by eventID occurs.
eventID | The numeric ID of a previously scheduled event. |
Integer getScheduleDuration | ( | eventID | ) |
Determines how long the event associated with eventID was scheduled for.
eventID | The numeric ID of a previously scheduled event. |
Integer getSimTime | ( | ) |
get the time, in ticks, that has elapsed since the engine started executing.
Integer getTimeSinceStart | ( | eventID | ) |
Determines how much time has passed since the event specified by eventID was scheduled.
eventID | The numeric ID of a previously scheduled event. |
Boolean isEventPending | ( | eventID | ) |
See if the event associated with eventID is still pending.
When an event passes, the eventID is removed from the event queue, becoming invalid, so there is no discnerable difference between a completed event and a bad event ID.
eventID | The numeric ID of a previously scheduled event. |
Integer schedule | ( | t | , |
objID|| | 0, | ||
functionName | , | ||
arg0 | , | ||
..., | |||
argN | |||
) |
Schedule "functionName" to be executed with optional arguments at time t (specified in milliseconds) in the future.
This function may be associated with an object ID or not. If it is associated with an object ID and the object is deleted prior to this event occurring, the event is automatically canceled.
t | The time to wait (in milliseconds) before executing functionName. |
objID | An optional ID to associate this event with. |
functionName | An unadorned (flat) function name. |
arg0,..,argN | - Any number of optional arguments to be passed to functionName. |