Jump to content

How do I detect perk/attribute selection?


Starwaster

Recommended Posts

Is there an event to detect that a perk or attribute has been selected chosen level up?

 

I'm currently binding to OnStoryIncreaseLevel() which is fine for the actual level up event but I can't find an event that tells me when a perk or attribute has been trained up...

Link to comment
Share on other sites

In the event that someone else has the same need, this is what I ended up doing:

Event OnInit()
	trace(self, "Script initializing. Registering for events...")
	RegisterForMenuOpenCloseEvent("LevelUpMenu")
EndEvent

Event OnStoryIncreaseLevel(int aiNewLevel)
	trace(self, "Player leveled up! Checking crafting perks for eligibility...")
	CheckForAutoPerks(aiNewLevel)
EndEvent

Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening)
    trace(self, "Menu event detected!")
	if (asMenuName== "LevelUpMenu")
        if (!abOpening)
			trace(self, "Perk menu closing, re-checking requirements for auto-perk eligibility")
			CheckForAutoPerks()
        endif
    endif
EndEvent

Hope someone finds that useful

Link to comment
Share on other sites

  • Recently Browsing   0 members

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