Difference between revisions of "EVENT TYPE ALLY ATTACKED"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(split from event)
 
m (remove redunant category)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
*<b>Sent When:</b> an ally has received the ATTACKED event. An ally is an object with the same group ID.
+
{{event
*<b>Sent From:</b> scripts (rules_core - attack event handler)
+
|sourcefile=events_h
*<b>Sent To:</b> Allied creatures, placeables (of the same group as the sender)
+
|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)
Parameters:
+
|tocategory1=creature
*<b>Creator:</b> ally object (object being attacked)
+
|tocategory2=placeable
*<b>Object 0:</b> attacking object
+
|sortkey=ALLY_ATTACKED
 
+
|from=scripts (rules_core - attack event handler)
[[Category:Event types]]
+
|creatordesc= ally object (object being attacked)
 +
|creatorname= oAlly
 +
|object0name= oAttacker
 +
|object0desc= attacking object
 +
|int0name=bDoNotTriggerUpdate
 +
|int0desc=Don't fire a 'update my allies' event as well
 +
}}

Latest revision as of 01:09, 12 February 2010

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)
  • Integer 0: Don't fire a 'update my allies' event as well
  • Object 0: attacking object

Usage

case EVENT_TYPE_ALLY_ATTACKED:
{
object oAlly = GetEventCreator(ev); // ally object (object being attacked)
int bDoNotTriggerUpdate = GetEventInteger(ev, 0); // Don't fire a 'update my allies' event as well
object oAttacker = GetEventObject(ev, 0); // attacking object

// insert event-handling code here

break;
}