» Thu Jun 21, 2012 9:58 am
Thanks for the replies.
Just a fast question that maybe you knowledgeable folks can answer here real fast. Otherwise I will start a new post later. This is kinda unrelated, but related in the sense that I am having issues with the correct property I made.
I have a quest that runs on startup and registers an event that runs and re-registers every 20 seconds. Later I will drop it down to 120 seconds or longer. Anyway, I have a property set now in the psc, a Barbarian00 perk, and its auto-filled and linked to the property in the script properties window and etc. Or so I believe. I also am sure my code reaches this snippet because I am seeing the text pop up every 20 seconds. But I ALWAYS end up in the IF condition whether I have the Barbarian00 perk or not, and whether or not I have the "!" in front of the condition or not. Its always getting IN the IF block. But the player.AddPerk never ever works, even though I qualify in terms of my skill rank. However, the script compiles just fine. I'm kinda jumping into the scripting tho, so maybe I'm missing obvious?
Below is the code fragment:
If !(player.HasPerk(Barbarian00))
Debug.Notification("Made it into IF statement")
player.AddPerk(Barbarian00)
EndIf
Also, here is the perk associated created in my psc:
Perk Property Barbarian00 Auto
Is there any obvious reason why my script compiles with no errors, and yet I always get inside the IF loop whether I use ! or I dont use ! and whether or not I have Barbarian00 (which I assume is the 1/5 that I need 0 skill points for) and yet the Addperk never works?
Thanks so much!