Hacktank Posted December 20, 2014 Share Posted December 20, 2014 (edited) Hello everyone, I've run into a bit of a snag with a mod I'm working on. I need to be able to test whether an actor is casting a spell they have equipped, either charging/holding a fire-and-forget spell, or casting a continuous spell. This is what I have so far, the second test (for isCastingConcentration) does work spell spellInHand = aTarget.getEquippedSpell(0) if spellInHand if ?????? isCasting = true if spellInHand.GetNumEffects() > 0 MagicEffect eff = spellInHand.GetNthEffectMagicEffect(0) if eff if eff.GetCastingType() == 2 isCastingConcentration = true endif endif endif endif endif Anyone have any ideas? Edited December 20, 2014 by Hacktank Link to comment Share on other sites More sharing options...
Arocide Posted December 20, 2014 Share Posted December 20, 2014 (edited) You maybe able to use AnimVars instead such as: akTarget.GetAnimationVariableBool("IsCastingRight") akTarget.GetAnimationVariableBool("IsCastingLeft") akTarget.GetAnimationVariableBool("IsCastingDual") You can check those to see if they are true which would indicate the target is casting something. Never used those specific AnimVars myself but they might do what you require. EDIT: Changed IsDualCasting to IsCastingDual after Hack pointed it out. Edited December 20, 2014 by Arocide Link to comment Share on other sites More sharing options...
Hacktank Posted December 20, 2014 Author Share Posted December 20, 2014 (edited) You maybe able to use AnimVars instead such as: akTarget.GetAnimationVariableBool("IsCastingRight") akTarget.GetAnimationVariableBool("IsCastingLeft") akTarget.GetAnimationVariableBool("IsDualCasting") You can check those to see if they are true which would indicate the target is casting something. Never used those specific AnimVars myself but they might do what you require. Sweet, works like a charm. Thanks man. EDIT: For anyone that tries this later: The dual-cast variable is actually "IsCastingDual" Edited December 20, 2014 by Hacktank Link to comment Share on other sites More sharing options...
Arocide Posted December 20, 2014 Share Posted December 20, 2014 (edited) EDIT: For anyone that tries this later: The dual-cast variable is actually "IsCastingDual" Whoops, I better Edit that in my post too. :sweat: Edited December 20, 2014 by Arocide Link to comment Share on other sites More sharing options...
Recommended Posts