Jump to content

[Scripting] if statements/dispelling active magic effects?


Catman030

Recommended Posts

I've been looking for an if statement that looks to see if a certain magic effect is active on the player, and if it is, to deactivate it. Does anyone know what i'm looking for? Thanks

 

 

MagicEffect property AlchFortifyHealRate auto
MagicEffect property DA11AbFortifyHealRate auto
MagicEffect property EnchFortifyHealRateConstantSelf auto
MagicEffect property RaceArgonianFortifyHealthRate auto
MagicEffect property FoodRestoreHealthDuration auto

 

if (Game.GetPlayer().HasMagicEffect(DA11AbFortifyHealRate))

 

endIf

Link to comment
Share on other sites

Okay, the "if" statement works, but is there anything I can use to cancel the effect im looking for if its found to be active?

 

If it helps, here's my code.

MagicEffect property armoreffect auto

Event OnUnEquipped(Actor akActor)
        if (Game.GetPlayer().HasMagicEffect(armoreffect))
		Game.GetPlayer().RemoveSpell(armoreffect)
	endif
EndEvent

And i get this when I try to compile:

 

"type mismatch on parameter 1 (did you forget a cast?)"
Edited by Catman030
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...