HELP! Script acting mucho weird!

Post » Mon Feb 25, 2013 2:34 am

This is dangerously close to driving me insane...

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?
User avatar
benjamin corsini
 
Posts: 3411
Joined: Tue Jul 31, 2007 11:32 pm

Post » Mon Feb 25, 2013 4:29 am

You created a Perk, and ticked "Playable" and "hidden" right?
User avatar
Claire Vaux
 
Posts: 3485
Joined: Sun Aug 06, 2006 6:56 am

Post » Mon Feb 25, 2013 3:59 am

Sure did. It's not even Hidden. And yes, it is indeed filled into the property.
User avatar
Project
 
Posts: 3490
Joined: Fri May 04, 2007 7:58 am

Post » Mon Feb 25, 2013 11:08 am

The script you posted isn't a condition in perk reference... right?
User avatar
Katie Samuel
 
Posts: 3384
Joined: Tue Oct 10, 2006 5:20 am


Return to V - Skyrim