How would I make a spell drain all the players magic?

Post » Sun Dec 22, 2013 9:26 am

I want to make a powerful spell that, regardless of equipment, would drain the users magic and render him unable to use magic for ...say.... a few minutes, even if that player has equipment that lowers magick cost by 100%. Is there any way to do that?

User avatar
Timara White
 
Posts: 3464
Joined: Mon Aug 27, 2007 7:39 am

Post » Sun Dec 22, 2013 7:26 am

Sure, you could use a magic effect with a simple script attached to lower the player's Magicka and MagickaRate to zero (using http://www.creationkit.com/ModActorValue_-_Actor), then apply a hidden perk to them with an http://www.creationkit.com/Perk_Entry_Point that does something like Mod Spell Cost, and "set value" to 100, which will override any magicka cost reductions, and make their spells cost 100 magicka, which they will no longer have.

User avatar
Maeva
 
Posts: 3349
Joined: Mon Mar 26, 2007 11:27 pm

Post » Sun Dec 22, 2013 7:18 am

ok, I have to admit I haven't scripted for Skyrim before (only NV), so please bear with me. so I would write a script like

Game.GetPlayer().ModActorValue (Magicka, 0)Game.GetPlayer().ModActorValue (MagickaRate, 0)

and then attach that to a magic effect in the spell. Right? That way, after the spell is cast, it sets the players magick and magic regen to 0.

Then what kind of script do I use to apply that moded spell cost?

User avatar
Leticia Hernandez
 
Posts: 3426
Joined: Tue Oct 23, 2007 9:46 am


Return to V - Skyrim