Jump to content

Event OnSpellcast when it's actually a spell?


AstralFire

Recommended Posts

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")
 endIf
endEvent

 

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.'

Link to comment
Share on other sites

"Parameters akSpell: Spell that was cast. Can be Spell, Enchantment, Potion, or Ingredient."

 

So basically the answer is NO.

 

I think what the example does is cast the form akSpell to a spell and see if it gives an error or not.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...