EVENT TYPE DAMAGED

From Dragon Age Toolset Wiki
Revision as of 20:39, 30 July 2009 by BryanDerksen (Talk | contribs) (|sourcefile=script.ldf)

Jump to: navigation, search
Source:
script.ldf
Sent when:
an object loses 1 hit point or more
Sent from:
scripts
Sent to:
creatures, placeables
Parameters:
  • Creator: creature dealing the damage
  • Integer 0: Amount of damage dealt
  • Integer 1: type of damage dealt

Usage

case EVENT_TYPE_DAMAGED:
{
object oAttacker = GetEventCreator(ev); // creature dealing the damage
int nDamage = GetEventInteger(ev, 0); // Amount of damage dealt
int nDamageType = GetEventInteger(ev, 1); // type of damage dealt

// insert event-handling code here

break;
}