AstralFire Posted June 20, 2012 Posted June 20, 2012 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.'
steve40 Posted June 20, 2012 Posted June 20, 2012 "Parameters akSpell: Spell that was cast. Can be Spell, Enchantment, Potion, or Ingredient." So basically the answer is NO.
AstralFire Posted June 20, 2012 Author Posted June 20, 2012 Figured out the solution to my own question: just do a 'hasSpell(akSpell)' and it should work out just fine.
EnaiSiaion Posted June 20, 2012 Posted June 20, 2012 "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.
Recommended Posts