Event OnSpellcast when it's actually a spell?

Post » Thu Jun 21, 2012 3:04 pm

The creation kit has the example:
Event OnSpellCast(Form akSpell)  Spell spellCast = akSpell as Spell  if spellCast && spellCast == FireballSpell    Debug.Trace("We just cast a fireball!")  else    Debug.Trace("We cast something, but we don't know what it is")  endIfendEvent

Noting the fragment

  Spell spellCast = akSpell as Spell  if spellCast

Does this part automatically return false if the event was triggered by a potion, enchantment, or ingredient? I'm hoping the answer is 'yes.'
User avatar
meghan lock
 
Posts: 3451
Joined: Thu Jan 11, 2007 10:26 pm

Post » Fri Jun 22, 2012 1:30 am

Figured out the solution to my own question: just do a 'hasSpell(akSpell)' and it should work out just fine.
User avatar
Juanita Hernandez
 
Posts: 3269
Joined: Sat Jan 06, 2007 10:36 am


Return to V - Skyrim