GetLastAttacker

From NWN Lexicon
Revision as of 12:23, 22 June 2020 by Jasperre (talk | contribs)
(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 is usually used in the OnPhysicalAttacked events for creatures, placeables and doors.
Return OBJECT_INVALID on error.



=Remarks

It is most consistent to use this in the OnPhysicalAttacked event. However any script can call this using the oAtackee parameter. However do not expect it to keep the value in there and it might be cleared at any time outside of the OnPhysicalAttacked event itself.


Version

1.30

See Also

functions: 

GetTotalDamageDealt

events: 

OnPhysicalAttacked Event



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