Need help with an enchantment script

Post » Fri Dec 21, 2012 2:41 pm

I have adapted a script that works to make a jump boosting enchantment, but I've hit a snag. The enchantment works, but it won't work when I start the game fro desktop unless I unequip and then reequip the item the enchantment is attached to.

Here's the script in question:

Scriptname PoTNJumpBoost extends activemagiceffect

GlobalVariable Property JumpSetting Auto
Int Property DefaultJumpHeight = 76 Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
if akTarget==Game.GetPlayer()
Game.SetGameSettingFloat("fJumpHeightMin",DefaultJumpHeight*(JumpSetting.GetValue()+1))
endif
endEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster)
if akTarget==Game.GetPlayer()
Game.SetGameSettingFloat("fJumpHeightMin",DefaultJumpHeight)
endif
endEvent

Now, from what I've seen in the CK Wiki, the SetGameSettingFloat command requires a maintenance script so that I won't have to unequip and reequip, but I don't know how to write one of those. Can anyone show me what I need to do?
User avatar
Ells
 
Posts: 3430
Joined: Thu Aug 10, 2006 9:03 pm

Return to V - Skyrim