GetLastSpell
From NWN Lexicon
Contents |
[edit] GetLastSpell()
Determines the spell that was last cast.
int GetLastSpell();
[edit] Description
This is for use in a OnSpellCastAt script, it gets the ID (SPELL_*) of the spell that was cast.
It will not return the true spell value, but whatever value is put into the EventSpellCastAt() - therefore, sub-dial spells like Polymorph will mearly return SPELL_POLYMORPH not the sub spell number.
[edit] Remarks
You should not use this function in actual spell scripts. In spell scripts, use GetSpellId instead.
[edit] Version
1.61
[edit] Example
// If the last spell was SPELL_VIRTUE say something void main() { if(GetLastSpell() == SPELL_VIRTUE) { SpeakString("I feel so alive! I feel...virtuous!"); } }
[edit] See Also
functions: | |
constants: | |
events: |
author: Jody Fletcher, editor: Jasperre