Difference between revisions of "EVENT TYPE DAMAGED"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(split from event)
 
m (remove redundant category)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
*<b>Sent When:</b> an object loses 1 hit point or more
+
{{needs review}}
*<b>Sent From:</b> scripts
+
*<b>Sent To:</b> creatures, placeables
+
  
Parameters:
+
{{event
*<b>Creator:</b> creature dealing the damage
+
|sourcefile=script.ldf
*<b>Int 0:</b> amount of damage dealt
+
|when=an object loses 1 hit point or more
*<b>Int 1:</b> type of damage dealt
+
|from=scripts
 +
|tocategory1=creature
 +
|tocategory2=placeable
 +
|to= [[Creature]]s, [[placeable]]s
 +
|creatorname= oDamager
 +
|creatordesc=creature dealing the damage
 +
|float0name= fDamage
 +
|float0desc= Amount of damage dealt
 +
|int0name= nDamageType
 +
|int0desc= type of damage dealt
 +
|int1name=nAbility
 +
|int1desc=
 +
|sortkey=DAMAGED
 +
}}
  
[[Category:Event types]]
+
Handled in placeable_h, rules_core, and creature_core

Latest revision as of 00:48, 12 February 2010

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

Handled in placeable_h, rules_core, and creature_core