Category:Targeting Functions

From NWN Lexicon
Jump to navigationJump to search

Targeting Function Category

Functions that deal with targeting.



Functions

Name Brief Description

FindSingleRangedTarget

Seeks out an enemy more than 3m away

GetAttackTarget

Determines the current foe under attack by the specified creature.

GetAttemptedAttackTarget

Determines the last creature that an attempted attack was made on.

GetAttemptedSpellTarget

Determines the creature a spell was attempted to be cast at.

GetChangeInX

Convenience function to calculate the change in the X axis

GetDistanceBetween

The distance in meters between two objects

GetDistanceBetweenLocations

The distance in meters between two locations in the game.

GetDistanceToObject

The distance from the caller of the script to the object in meters.

GetFacingFromLocation

Get the facing value from a location variable.

GetFactionBestAC

Get the member of a faction (party) who has the highest Armor Class.

GetFactionLeastDamagedMember

Get the member of oFactionMember's faction that has taken the fewest hit points of damage.

GetFactionMostDamagedMember

Get the member of oFactionMember's faction that has taken the most hit points of damage.

GetFactionWorstAC

Get the object faction member with the lowest armor class.

GetLastHostileActor

Gets the last living, non plot creature that performed a hostile act against the object.

GetLocation

Gets the location of an object.

GetMostDangerousClass

Use the four archetypes to determine the most dangerous group type facing the NPC.

GetNearestSeenOrHeardEnemy

Determines closest visual creature and determines the closest heard creature.

LineOfSightObject

Is there a line of sight between two objects

LineOfSightVector

Returns whether there's a direct line between two positions

SetBehaviorState

Sets an NPC's behavior.

ShoutDisturbed

Turns NPCs of the container's faction hostile towards the PC that destroyed or opened the container.

VersusRacialTypeEffect

Set eEffect to be versus nRacialType.