Difference between revisions of "EVENT TYPE DAMAGED"
From Dragon Age Toolset Wiki
BryanDerksen (Talk | contribs) |
BryanDerksen (Talk | contribs) (new to parameter) |
||
Line 5: | Line 5: | ||
|when=an object loses 1 hit point or more | |when=an object loses 1 hit point or more | ||
|from=scripts | |from=scripts | ||
− | | | + | |to1=creature |
+ | |to2=placeable | ||
|creatorname= oAttacker | |creatorname= oAttacker | ||
|creatordesc=creature dealing the damage | |creatordesc=creature dealing the damage |
Revision as of 20:27, 5 August 2009
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:
- 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;
}
{
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;
}
Note: placeable_h has different parameters.
object oDamager = GetEventCreator(ev); float fDamage = GetEventFloat(ev, 0); int nDamageType = GetEventInteger(ev, 0);