Difference between revisions of "EVENT TYPE ATTACKED"

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

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;
}