SetLastGenericSpellCast

From NWN Lexicon
Jump to navigationJump to search



SetLastGenericSpellCast(int)

Sets a local variable that stores the spell ID of the last spell cast.

void SetLastGenericSpellCast(
    int nSpell
);

Parameters

nSpell

SPELL_*


Description

Sets a local variable for the last spell used so the BioWare core AI system doesn't keep casting the same spell.

Used in conjuction with CompareLastSpellCast ().



Remarks

Uses the local variable name "NW_GENERIC_LAST_SPELL".

This is part the Core AI programming to make NPC actions appear more dynamic.


Requirements

#include " x0_inc_generic "

Version

1.29

See Also

functions: 

GetLastGenericSpellCast

constants: 

SPELL_* Constants



 author: Tom Cassiotis, editors: Jody Fletcher, Mistress