GetNumberOfRangedAttackers

From NWN Lexicon



Contents

[edit] GetNumberOfRangedAttackers()

Determines the number of enemies outside a 5 meter radius of the target object.

[edit] Description

Returns the number of enemies located outside a 5 meter radius, attacking the target object.



[edit] Remarks

GetNumberOfRangedAttackers() retrieves the number of ranged attackers where the source object is the object executing the script.


[edit] Requirements

#include " x0_i0_enemy "

[edit] Version

1.22

[edit] Example

// Demonstrates how to yield speech based on the number of ranged attackers
#include "x0_i0_enemy"
 
void main()
{
     if(GetNumberOfRangedAttackers()>8)
     {
           ActionSpeakString("Zounds! I'm being pelted with arrows!");
     }
}

[edit] See Also

functions: 

GetNumberOfMeleeAttackers



 author: Sarev0k, editors: Tom Cassiotis, Mistress
 

Personal tools
Categories