Difference between revisions of "SetEventInteger"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (looks okay, removing tag)
 
Line 24: Line 24:
 
<!-- This section contains additional comments, observations and known issues. -->
 
<!-- This section contains additional comments, observations and known issues. -->
 
It should be noted that there is no maximum number of values on an event, as the array of values on the event expands as needed.
 
It should be noted that there is no maximum number of values on an event, as the array of values on the event expands as needed.
 +
 +
The event returned is a new event. So, for example,
 +
<pre>
 +
event ev      = GetCurrentEvent();
 +
event evEvent2 = Event(EVENT_TYPE_SPELLSCRIPT_AFTER_EFFECTS);
 +
 +
eEvent2 = SetEventInteger(evEvent2, 0, ABILITY_SPELL_BLIZZARD);
 +
DelayEvent(1.0f, GetEventTarget(ev), evEvent2, "my_script");
 +
</pre>
 +
will not work without the assignment in the third line.
  
 
<!-- == Examples == -->
 
<!-- == Examples == -->

Latest revision as of 07:47, 25 January 2011

Sets the specified integer on the event.

event SetEventInteger(
event evEvent,
int nIndex,
int nValue
);
Parameters:
evEvent
The event to set the integer on
nIndex
The index of the integer to set
nValue
The value of the integer to set
Returns:

Returns the modfied event, returns an invalid event on error.

Source:

script.ldf

Description

Sets the specified integer on the event.

Remarks

It should be noted that there is no maximum number of values on an event, as the array of values on the event expands as needed.

The event returned is a new event. So, for example,

event ev       = GetCurrentEvent();
event evEvent2 = Event(EVENT_TYPE_SPELLSCRIPT_AFTER_EFFECTS);

eEvent2 = SetEventInteger(evEvent2, 0, ABILITY_SPELL_BLIZZARD);
DelayEvent(1.0f, GetEventTarget(ev), evEvent2, "my_script");

will not work without the assignment in the third line.


See also

GetEventInteger