Difference between revisions of "DelayEvent"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (removed tag)
Line 32: Line 32:
 
With a negative or zero time in fSeconds, the event will run on the next AI update.   
 
With a negative or zero time in fSeconds, the event will run on the next AI update.   
  
<!-- == Examples == -->
+
== Examples ==
 
<!-- This section contains examples transcluded from the snippet library. -->
 
<!-- This section contains examples transcluded from the snippet library. -->
 +
To create a quasi-heartbeat, create a script called 'my_heartbeat' and include this in it
 +
 +
DelayEvent(6.0f,GetHero(),Event(EVENT_TYPE_HEARTBEAT),"my_heartbeat");
  
 
<!-- == See also == -->
 
<!-- == See also == -->

Revision as of 09:53, 8 December 2009

Signals a delayed event to the specified object.

void DelayEvent(
float fSeconds,
object oObject,
event evEvent,
string scriptname = ""
);
Parameters:
fSeconds
The number of seconds for which to delay the event
oObject
The object to signal the event to
evEvent
The event to signal
scriptname
If specified overides the default script
Returns:

Nothing.

Source:

script.ldf

Description

Signals a delayed event to the target object.

Remarks

With a negative or zero time in fSeconds, the event will run on the next AI update.

Examples

To create a quasi-heartbeat, create a script called 'my_heartbeat' and include this in it

DelayEvent(6.0f,GetHero(),Event(EVENT_TYPE_HEARTBEAT),"my_heartbeat");