I created a new perk.
I created a new quest.
I created an alias for Player, and added a script to the alias.
All the script is supposed to do is add the perk to the player when the player sleeps. Here's the code:
Script name Bahmehblah extends ReferenceAliasperk property myAwesomePerk autoevent onInit() RegisterForSleep()endEventevent OnSleepStop (bool abInterrupted) if (game.getPlayer().hasPerk(myAwesomePerk) == 0) debug.Notification ("Added perk!") game.getPlayer().addPerk(myAwesomePerk) else debug.Notification ("You already have the perk!") endIfendEvent
Before you ask - yes, the property is filled with the right perk. When I sleep, I receive the message "added perk!" but the perk is never added. Even if I manually add the perk via console, the game continues to insist that I don't have the perk next time I sleep. What gives? Syntax is right, property is filled out right, why is Skyrim intent on driving me insane?