On Module Load event example:
"_on_damage" script example:
Hellball script example using DealDamage
Files | |
file | nwnx_damage.nss |
Classes | |
struct | NWNX_Damage_DamageEventData |
Damage Event Data. More... | |
struct | NWNX_Damage_AttackEventData |
Attack Event Data. More... | |
struct | NWNX_Damage_DamageData |
Used for DealDamage. More... | |
Functions | |
void | NWNX_Damage_SetDamageEventScript (string sScript, object oOwner=OBJECT_INVALID) |
Sets the script to run with a damage event. More... | |
struct NWNX_Damage_DamageEventData | NWNX_Damage_GetDamageEventData () |
Get Damage Event Data. More... | |
void | NWNX_Damage_SetDamageEventData (struct NWNX_Damage_DamageEventData data) |
Set Damage Event Data. More... | |
void | NWNX_Damage_SetAttackEventScript (string sScript, object oOwner=OBJECT_INVALID) |
Sets the script to run with an attack event. More... | |
struct NWNX_Damage_AttackEventData | NWNX_Damage_GetAttackEventData () |
Get Attack Event Data. More... | |
void | NWNX_Damage_SetAttackEventData (struct NWNX_Damage_AttackEventData data) |
Set Attack Event Data. More... | |
void | NWNX_Damage_DealDamage (struct NWNX_Damage_DamageData data, object oTarget, object oSource=OBJECT_SELF, int iRanged=FALSE) |
Deal damage to a target. More... | |
void NWNX_Damage_SetDamageEventScript | ( | string | sScript, |
object | oOwner = OBJECT_INVALID |
||
) |
Sets the script to run with a damage event.
sScript | The script that will handle the damage event. |
oOwner | An object if only executing for a specific object or OBJECT_INVALID for global. |
Definition at line 175 of file nwnx_damage.nss.
struct NWNX_Damage_DamageEventData NWNX_Damage_GetDamageEventData | ( | ) |
Get Damage Event Data.
Definition at line 186 of file nwnx_damage.nss.
void NWNX_Damage_SetDamageEventData | ( | struct NWNX_Damage_DamageEventData | data | ) |
Set Damage Event Data.
data | A NWNX_Damage_DamageEventData struct. |
Definition at line 231 of file nwnx_damage.nss.
void NWNX_Damage_SetAttackEventScript | ( | string | sScript, |
object | oOwner = OBJECT_INVALID |
||
) |
Sets the script to run with an attack event.
sScript | The script that will handle the attack event. |
oOwner | An object if only executing for a specific object or OBJECT_INVALID for global. |
Definition at line 271 of file nwnx_damage.nss.
struct NWNX_Damage_AttackEventData NWNX_Damage_GetAttackEventData | ( | ) |
Get Attack Event Data.
Definition at line 282 of file nwnx_damage.nss.
void NWNX_Damage_SetAttackEventData | ( | struct NWNX_Damage_AttackEventData | data | ) |
Set Attack Event Data.
data | A NWNX_Damage_AttackEventData struct. |
Definition at line 334 of file nwnx_damage.nss.
void NWNX_Damage_DealDamage | ( | struct NWNX_Damage_DamageData | data, |
object | oTarget, | ||
object | oSource = OBJECT_SELF , |
||
int | iRanged = FALSE |
||
) |
Deal damage to a target.
data | A NWNX_Damage_DamageData struct. |
oTarget | The target object on whom the damage is dealt. |
oSource | The source of the damage. |
iRanged | Whether the attack should be treated as ranged by the engine (for example when considering damage inflicted by Acid Sheath and other such effects) |
Definition at line 376 of file nwnx_damage.nss.