Difference between revisions of "HasMagicEffect"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Cipscis
(Added link to Papyrus version)
imported>DavidJCobb
(→‎Description: minor correction)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
==Description==
Returns 1 if the calling reference is currently being affected by the given magic effect.
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. 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:==
==Syntax:==
  ActorRef.HasMagicEffect EffectID  
  ActorRef.HasMagicEffect EffectID  
==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 13: Line 13:


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




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

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 the specified Magic Effect, 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.HasMagicEffect EffectID 

Example:[edit | edit source]

Player.HasMagicEffect 000B729D ; (FrostSlowConcAimed)

Papyrus Version[edit | edit source]

HasMagicEffect

See Also[edit | edit source]