Difference between revisions of "EVENT TYPE ALLY ATTACKED"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(update template)
(add source)
Line 1: Line 1:
 
{{event
 
{{event
 +
|sourcefile=events_h
 
|when=an ally has received the ATTACKED event. An ally is an object with the same group ID.
 
|when=an ally has received the ATTACKED event. An ally is an object with the same group ID.
 
|to=Allied creatures, placeables (of the same group as the sender)
 
|to=Allied creatures, placeables (of the same group as the sender)

Revision as of 22:25, 18 August 2009

Source:
events_h
Sent when:
an ally has received the ATTACKED event. An ally is an object with the same group ID.
Sent from:
scripts (rules_core - attack event handler)
Sent to:
Allied creatures, placeables (of the same group as the sender)
Parameters:
  • Creator: ally object (object being attacked)
  • Object 0: attacking object

Usage

case EVENT_TYPE_ALLY_ATTACKED:
{
object oAlly = GetEventCreator(ev); // ally object (object being attacked)
object oAttacker = GetEventObject(ev, 0); // attacking object

// insert event-handling code here

break;
}