Difference between revisions of "HasMagicEffect"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>DavidJCobb
(→‎Description: The description for this function was totally wrong!)
imported>DavidJCobb
m
Line 1: Line 1:
==Description==
==Description==
If the calling reference is being affected by a [[Spell]] that ''can potentially apply'' the specified [[Magic Effect]], 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]]'' the specified [[Magic Effect]], 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).


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.
Line 8: Line 8:
==Example:==
==Example:==
  Player.HasMagicEffect 000B729D ; (FrostSlowConcAimed)
  Player.HasMagicEffect 000B729D ; (FrostSlowConcAimed)
Returns 1 if the calling reference is currently being affected by the given magic effect.


==Papyrus Version==
==Papyrus Version==
Line 15: Line 13:


==See Also==  
==See Also==  
[[IsSpellTarget]]<br>
*[[IsSpellTarget]]
[[OnMagicEffectHit]]  
*[[OnMagicEffectHit]]  
 
 
 




[[Category:Console Commands]]
[[Category:Console Commands]]
[[Category:Condition Functions]]
[[Category:Condition Functions]]

Revision as of 16:08, 1 June 2017

Description

If the calling reference is being affected by a Spell that can potentially apply the specified Magic Effect, 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).

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

Syntax:

ActorRef.HasMagicEffect EffectID 

Example:

Player.HasMagicEffect 000B729D ; (FrostSlowConcAimed)

Papyrus Version

HasMagicEffect

See Also