EVENT TYPE DAMAGED
From Dragon Age Toolset Wiki
Revision as of 18:03, 19 August 2009 by BryanDerksen (Talk | contribs) (seems to be handled consistenty in core scripts now, not sure where the integer damage parameter came from)
The documentation on this page is incomplete, obsolete, or otherwise in need of a thorough review. The current content may provide a good starting point for this, but do not rely on its accuracy when using it to design content.
- 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: type of damage dealt
- Integer 1: [Undocumented]
- Float 0: Amount of damage dealt
Usage
case EVENT_TYPE_DAMAGED:
{
object oDamager = GetEventCreator(ev); // creature dealing the damage
int nDamageType = GetEventInteger(ev, 0); // type of damage dealt
int nAbility = GetEventInteger(ev, 1); //
float fDamage = GetEventFloat(ev, 0); // Amount of damage dealt
// insert event-handling code here
break;
}
{
object oDamager = GetEventCreator(ev); // creature dealing the damage
int nDamageType = GetEventInteger(ev, 0); // type of damage dealt
int nAbility = GetEventInteger(ev, 1); //
float fDamage = GetEventFloat(ev, 0); // Amount of damage dealt
// insert event-handling code here
break;
}
Handled in placeable_h, rules_core, and creature_core