Page 1 of 1

How to get the item the spell was cast with

Posted: Sat Jul 19, 2003 3:18 pm
by _LuCkY_
Hi,

I need to know what item a spell was cast with. So is it cast from a scroll or wand, etc. or is it cast from your spellbook? The script gets called from the OnSpellCastAt event. I've tried using the GetSpellCastItem, but that one only works if the script gets called by the item itself.

If you have any ideas, give me a hand

Posted: Fri Aug 01, 2003 3:12 pm
by Brannor
I don't get what you mean.

I use this:
(but not sure if it works 100%)

object castItem = GetSpellCastItem();
if (GetIsObjectValid(castItem) == TRUE )
{
...// is using an item to cast.
}

Posted: Sun Aug 03, 2003 8:43 am
by _LuCkY_
Well thats exactly what I mean. I just want to know if the spell is cast with a scroll or from your memory. GetSpellCastItem doesn't work on the OnSpellCastAt event unfortunateally.