Jump to content

[LE] Can Someone Find The Flaw in This Short Script


Recommended Posts

Had this working yesterday morning. Made some changes for testing methods of calling the used spell's magicka cost but couldn't get it so I tried to change everything back and for some reason it seems like the DamageAV function won't work unless I put a flat number into it now, at least the base value function won't work.

 

 

 

Scriptname spellscostingstamina extends Actor

{Causes spells to cost stamina}
FormList Property SpellForm Auto
VisualEffect Property FX Auto
Perk Property drainperk Auto
Event OnSpellCast(Form akSpell)
If (Game.GetPlayer().HasPerk(drainperk))
If(SpellForm.hasForm(akspell))
Game.GetPlayer().DamageActorValue("stamina",(game.getplayer().getbaseactorvalue("Magicka")) - (game.getplayer().getactorvalue("Magicka")))
FX.Play(game.getPlayer())
EndIf
Endif
EndEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

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