GetFactionLeastDamagedMember(object, int)

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

object GetFactionLeastDamagedMember(
    object oFactionMember = OBJECT_SELF,
    int bMustBeVisible = TRUE
);

Parameters

oFactionMember

The object whose faction to search in. (Default: OBJECT_SELF)

bMustBeVisible

The member chose must be visible to the calling object. (Default: TRUE)


Description

Returns the member of oFactionMember's faction (or Player's party) that has taken the fewest hit points of damage. If bMustBeVisible is set to TRUE (default) then the least damaged member must be visible to the object who is doing the search.
Returns OBJECT_INVALID if oFactionMember's faction is invalid.



Remarks

Great function for determing who the bad guys will target in a fight. If you want a fight to last as long as possible, riddle your AI's with this so they are retargeting according to who can take the damage. Good way to draw a fight out and give the party a chance for survival, yet at the same time making sure everyone feels some pain.


Version

1.22

See Also

functions: GetFactionBestAC | GetFactionMostDamagedMember | GetFactionWorstAC
categories: Combat Information Functions | Get Data from Creature Functions | Party Functions | Perception Functions | Reputation/Faction Functions | Targeting Functions


 author: John Shuell
 Send comments on this topic.