GetLastAttacker

From NWN Lexicon
Revision as of 10:14, 21 August 2012 by Dood (talk | contribs) (Created page with " =GetLastAttacker(object)= Determine who last attacked a creature, door or placeable object. object  GetLastAttacker(     [[object | object ]...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



GetLastAttacker(object)

Determine who last attacked a creature, door or placeable object.

 object  GetLastAttacker(
     object  oAttackee = OBJECT_SELF
);

Parameters

oAttackee

Attacked object. (Default: OBJECT_SELF)


Description

Returns the last attacker of oAttackee. This should be used ONLY in the OnPhysicalAttacked events for creatures, placeables and doors.
Return OBJECT_INVALID on error.



Remarks

Remarks: I cannot for the life of me figure out why the description for this function says it should only be called from OnPhysicalAttacked. I’ve tried calling it from all sorts of events, even some not owned by the creature, and all of them work just fine, even a while after I’ve stopped attacking oAttackee.


Version

1.30

See Also

functions: 

GetTotalDamageDealt

events: 

OnPhysicalAttacked Event



 author: Jason Harris, editor: Lilac Soul, additional contributor(s): Lilac Soul