Jump to content

Trouble getting OnStoryIncreaseSkill to trigger


DaylenTheMaleficar

Recommended Posts

As a personal project to learn Papyrus, I've been re-writing the Third Era Attributes mod from scratch and have gotten everything from the level up messages to the MCM working, but I still can't seem to get the skill tracking to work. I've made a quest that triggers on Skill Increase, attached the script and all that jazz, but nothing happens in game and I don't know why. Is there something wrong with this code? Or is The quest somehow breaking?

Scriptname ssAttribSkill extends Quest

GlobalVariable property ssStrInc auto
GlobalVariable property ssEndInc auto
GlobalVariable property ssIntInc auto
GlobalVariable property ssWilInc auto
GlobalVariable property ssAgiInc auto
GlobalVariable property ssSpeInc auto
GlobalVariable property ssPerInc auto

Event OnStoryIncreaseSkill(string asSkill)
		if asSkill == "OneHanded" || asSkill == "TwoHanded"
			ssStrInc.SetValue(ssStrInc.GetValueInt() + 1)
		elseif asSkill == "Block" || asSkill == "HeavyArmor" || asSkill == "Smithing"
			ssEndInc.SetValue(ssEndInc.GetValueInt() + 1)
		elseif asSkill == "Alchemy" || asSkill == "Enchanting" || asSkill == "Conjuration"
			ssIntInc.SetValue(ssIntInc.GetValueInt() + 1)
		elseif asSkill == "Alteration" || asSkill == "Destruction" || asSkill == "Restoration"
			ssWilInc.SetValue(ssWilInc.GetValueInt() + 1)
		elseif asSkill == "Archery" || asSkill == "Lockpicking" || asSkill == "Pickpocket" || asSkill == "Sneak"
			ssAgiInc.SetValue(ssAgiInc.GetValueInt() + 1)
		elseif asSkill == "LightArmor"
			ssSpeInc.SetValue(ssSpeInc.GetValueInt() + 1)
		elseif asSkill == "Speechcraft" || asSkill == "Illusion"
			ssPerInc.SetValue(ssPerInc.GetValueInt() + 1)
		 endif
		 Debug.Notification("Skill Tracked.")
		 self.stop()
endevent
Link to comment
Share on other sites

  • 2 years later...
  • Recently Browsing   0 members

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