Trouble with AdvanceSkill

Post » Wed Feb 27, 2013 12:04 am

So, a perfectly working script all of a sudden stopped working for no apparent reason. I'm slightly increasing the armor skills while either running or sprinting, provided you are running for at least 5 seconds, and I have absolutely no idea why it doesn't work anymore in my latest tests. Here it is:

Spoiler

Scriptname MMM_IncreaseArmorSkill extends ObjectReference  Actor Property PlayerREF AutoKeyword Property ArmorLight Auto  Keyword Property ArmorHeavy Auto  Keyword Property ArmorBoots Auto  Keyword Property ArmorCuirass Auto  Keyword Property ArmorGauntlets Auto  Keyword Property ArmorHelmet AutoMessage Property MMM_TestMessageMSG Auto  Event OnInit()	RegisterForUpdate (5.0)EndEventEvent OnUpdate()	If ( PlayerREF.IsRunning() ) || ( PlayerREF.IsSprinting() )		If ( !PlayerREF.WornHasKeyword(ArmorLight) ) && ( PlayerREF.WornHasKeyword(ArmorBoots) ) && ( PlayerREF.WornHasKeyword(ArmorCuirass) ) && ( PlayerREF.WornHasKeyword(ArmorGauntlets) ) && ( PlayerREF.WornHasKeyword(ArmorHelmet) )			Game.AdvanceSkill("Heavyarmor" , 0.5)			MMM_TestMessageMSG.Show()		EndIf	EndIf	If ( PlayerREF.IsRunning() ) || ( PlayerREF.IsSprinting() )		If ( !PlayerREF.WornHasKeyword(ArmorHeavy) ) && ( PlayerREF.WornHasKeyword(ArmorBoots) ) && ( PlayerREF.WornHasKeyword(ArmorCuirass) ) && ( PlayerREF.WornHasKeyword(ArmorGauntlets) ) && ( PlayerREF.WornHasKeyword(ArmorHelmet) )			Game.AdvanceSkill("Lightarmor" , 0.5)			MMM_TestMessageMSG.Show()		EndIf	EndIfEndEvent

The test message shows up, meaning that the condition is met, but the skill does NOT increase by one bit. What the heck is wrong?
User avatar
Jenna Fields
 
Posts: 3396
Joined: Mon Dec 11, 2006 11:36 am

Return to V - Skyrim