EffectDamage(int, int, int)
Returns a new effect object.
effect EffectDamage( int nDamageAmount, int nDamageType = DAMAGE_TYPE_MAGICAL, int nDamagePower = DAMAGE_POWER_NORMAL );
Parameters
nDamageAmount
amount of damage to be dealt. This should be applied as an instantaneous effect.
nDamageType
DAMAGE_TYPE_* (Default: DAMAGE_TYPE_MAGICAL)
nDamagePower
(Default: DAMAGE_POWER_NORMAL)
Description
This function creates a new Damage Effect that causes The amount of Damage Specified in the first parameter, the type of damage defined in the second and the damage power (for breaching a creatures natural damage reduction with phisical damage) with the third Parameter.
Whoever calls the ApplyEffectToObject with EffectDamage is considered the damager, and the message to players usually names it. Useful to know if you want the PC to be the damager, but another script is performing the task (for example, a unique power).
Remarks
Constructors are special methods that return a new instance of an object. In NWN Script each effect that you can place on an object has it’s own constructor that creates a new instance of the specified effect. This effect object can then be used in an ApplyEffectToObject() Command. See Effect Constructor for more details.
Version
1.22
See Also
categories: | Effects Functions |
constants: | DAMAGE_POWER_* Constants | DAMAGE_TYPE_* Constants |
author: Michael Nork, editor: Jasperre, additional contributor(s): Jasperre
Send comments on this topic.