Difference between revisions of "EVENT TYPE ATTACKED"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (sort key)
m (remove redundant category)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
*<b>Sent When:</b> another object tried attacking this creature using melee/ranged weapons (hit or miss), talents or spells.
+
{{event
*<b>Sent From:</b> scripts (Rules_ResolveAttack function)
+
|sourcefile=events_h
*<b>Sent To:</b> creatures, placeables
+
|when=another object tried attacking this creature using melee/ranged weapons (hit or miss), talents or spells.
 
+
|from=scripts (Rules_ResolveAttack function)
Parameters:
+
|to= creatures, placeables
*<b>Creator:</b> attacking object
+
|tocategory1=creature
*<b>Object 0:</b> attacking object
+
|tocategory2=placeable
 
+
|sortkey=ATTACKED
[[Category:Event types|ATTACKED]]
+
|creatordesc=attacking object
 +
|object0name= oAttacker
 +
|object0desc= attacking object
 +
}}

Latest revision as of 01:10, 12 February 2010

Source:
events_h
Sent when:
another object tried attacking this creature using melee/ranged weapons (hit or miss), talents or spells.
Sent from:
scripts (Rules_ResolveAttack function)
Sent to:
creatures, placeables
Parameters:
  • Creator: attacking object
  • Object 0: attacking object

Usage

case EVENT_TYPE_ATTACKED:
{
object oAttacker = GetEventObject(ev, 0); // attacking object

// insert event-handling code here

break;
}