how to set player.hasperk to start a script

Post » Tue Jul 22, 2014 2:11 am

I need my perk script to run once, ONLY when the player attains the perk.

however looking through creation kit at all the different "oneffectstart" "oninit" etc. i couldn't find any script start conditions that would allow me to do this.

User avatar
luis ortiz
 
Posts: 3355
Joined: Sun Oct 07, 2007 8:21 pm

Post » Tue Jul 22, 2014 12:36 pm

Could you just use an If-Statement and an int? Your script would run often, but only register when you had the perk?

Actor Property PlayerRef AutoInt PerkDonePerk Property MyPerk Auto Event OnInit()  RegisterForSingleUpdate(1.0)EndEvent Event OnUpdate()  If ( PerkDone == 0 )       If ( PlayerRef.HasPerk(MyPerk) == 1 )          PerkDone = 1          ;DO STUFF      EndIf   Else     RegisterForSingleUpdate(1.0)   EndIfEndEvent
User avatar
Natasha Biss
 
Posts: 3491
Joined: Mon Jul 10, 2006 8:47 am

Post » Tue Jul 22, 2014 5:00 am

that looks like it will work, thank you very much :)

User avatar
carrie roche
 
Posts: 3527
Joined: Mon Jul 17, 2006 7:18 pm


Return to V - Skyrim