Difference between revisions of "HasMagicEffectKeyword"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>DavidJCobb
(→‎Description: The description for this function was totally wrong!)
imported>DavidJCobb
(→‎Description: minor correction)
 
Line 1: Line 1:
==Description==
==Description==
If the calling reference is being affected by a [[Spell]] that ''[[Effect List|can potentially apply]]'' a [[Magic Effect]] with the specified [[Keyword]], then the condition function returns 1. Effects will be detected by this condition even if they aren't ''actually'' affecting the reference (because their spell-side conditions aren't being met).
If the calling reference is being affected by a [[Spell]] that ''[[Effect List|can potentially apply]]'' a [[Magic Effect]] with the specified [[Keyword]], then the condition function returns 1. This means that a magic effect will cause this function to return 1 if the effect-side conditions are met, even if the spell-side conditions aren't met and the effect isn't actually active.


In other words, "having a magic effect" is distinct from "being affected by a magic effect," and this function tests for the former.
In other words, "having a magic effect" is distinct from "being affected by a magic effect," and this function tests for the former.

Latest revision as of 02:59, 2 June 2017

Description[edit | edit source]

If the calling reference is being affected by a Spell that can potentially apply a Magic Effect with the specified Keyword, then the condition function returns 1. This means that a magic effect will cause this function to return 1 if the effect-side conditions are met, even if the spell-side conditions aren't met and the effect isn't actually active.

In other words, "having a magic effect" is distinct from "being affected by a magic effect," and this function tests for the former.

Syntax[edit | edit source]

ActorRef.HasMagicEffectKeyword KeywordString 

Example[edit | edit source]

Player.HasMagicEffectKeyword "MagicBlessing"

Papyrus Version[edit | edit source]

Actor.HasMagicEffectWithKeyword

See Also[edit | edit source]

HasMagicEffect
IsSpellTarget
OnMagicEffectHit