[Help] Magic Effects only apply their effects...

Post » Wed Oct 02, 2013 8:12 am

Hey everyone.

I'm having a bit of trouble with magic effects.

What I'm basicly doing is adding a speedmult spell based on how much of the players inventory is filled up.

The problem with this is that the Spells effect only get applied when opening the inv/magic/Skill menu a second time after the effect has been applied. After that the spell works as intended.

Any ideas what might be causing this?

Thanks

EDIT: D'oh! I meant spells not magic effects xD

User avatar
Farrah Lee
 
Posts: 3488
Joined: Fri Aug 17, 2007 10:32 pm

Post » Wed Oct 02, 2013 3:14 pm

Yes, speedMult changes are only registered after something causes the game to re-check the player's carry weight / inventory. You can attach this script to your magic effect and it will then work as intended (I use this for a variety of speedMult magic effects):

Scriptname SpeedMultMGEFActivator extends ActiveMagicEffect;This script applies an invisible carryweight modifier;to the target of the magic effect, which will force;the game to register any Speed Multiplier changes.Event onEffectStart(Actor akTarget, Actor akCaster)	akTarget.modActorValue("CarryWeight", 0.01)EndEventEvent onEffectFinish(Actor akTarget, Actor akCaster)	akTarget.modActorValue("CarryWeight", -0.01)EndEvent

(You will need to attach this to the Magic Effect used by the spell)

User avatar
Umpyre Records
 
Posts: 3436
Joined: Tue Nov 13, 2007 4:19 pm

Post » Wed Oct 02, 2013 3:51 am

Thank you very much, friend =D That worked wonders =)

User avatar
Kathryn Medows
 
Posts: 3547
Joined: Sun Nov 19, 2006 12:10 pm


Return to V - Skyrim