Jump to content

Need some help with automatically adding a custom perk.


elguapo1991

Recommended Posts

I'm trying to automatically add a custom perk to my character on game load. For some reason I can't get it to work at all. I'm a newbie at Papyrus so I'm sure i'm missing something simple but important.


What I've done so far:


- Created new quest. http://i.imgur.com/K9XKw6B.png


- Added reference alias to the player for that quest. http://i.imgur.com/XDbr4Mg.png


- Wrote script to check if player has perk already, if not give player perk. http://i.imgur.com/PpWKUpC.png


- Attached script to player alias. http://i.imgur.com/epcSuhE.png


The script doesn't even seem to run at all (the first message box never shows up. (I did compile all scripts and there were no failures). What do I need to fix to get this to work?




Link to comment
Share on other sites

There is a note about OnPlayerGameLoad() on the Creation Kit Wiki and how it doesn't always work the first time. If you look at the second example on the OnPlayerGameLoad() page, it should show you what to do to make it call correctly.

 

I believe you would replace the Maintenence function with a function that does what you want, and then call that function OnInit rather than the Maintenence function.

Link to comment
Share on other sites

  On 7/4/2014 at 3:21 AM, Ceruulean said:

Wait, don't you just check the "Run on Start Game Enabled" Checkbox under the quest data tab?

 

I had a look at the OnPlayerGameLoad function, and it looked like it doesn't always work the first time - in fact, it usually doesn't. So I'm not sure if that would fix it, but it seems like it wouldn't fix the "first time loaded" issue.

Link to comment
Share on other sites

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

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