papyrus script + addperk = headache

Post » Mon Jun 18, 2012 6:27 am

Does anyone know how to get this function working: creationkit.c o m/AddPerk_-_Actor (dont have permission to post links? wtf)

I have done:


EVENT OnEffectStart(Actor Target, Actor Caster)
mySelf = caster
caster.AddPerk(ArmsmanRank1) --also tried variations of ("ArmsmanRank1") (000BABE4) etc..
endEVENT

and on compile i get either "ArmsmanRank1 variable undefined" or "mismatch on parameter 1 (did you forget a cast?)"

any ideas?
User avatar
suniti
 
Posts: 3176
Joined: Mon Sep 25, 2006 4:22 pm

Post » Mon Jun 18, 2012 5:02 am

My guess is you're not using a property for the perk? Check out thishttp://www.gamesas.com/topic/1345130-having-papyrus-trouble-here-are-some-things-to-try/, read Cipscis' comment at the bottom.
User avatar
Lauren Dale
 
Posts: 3491
Joined: Tue Jul 04, 2006 8:57 am

Post » Sun Jun 17, 2012 11:52 pm

I've just written a post explaining this here - http://www.gamesas.com/topic/1345130-having-papyrus-trouble-here-are-some-things-to-try/page__view__findpost__p__20277117 :)

Cipscis

EDIT:

Ah, I've been ninja'd!

Cipscis
User avatar
Lakyn Ellery
 
Posts: 3447
Joined: Sat Jan 27, 2007 1:02 pm

Post » Mon Jun 18, 2012 9:46 am

you guys are awesome thank you so much! setting the property was the problem.


Perk Property Armsman Auto
(then selected the proper perk from the drop down list)
caster.addperk(Armsman)

wooo!
User avatar
Maria Garcia
 
Posts: 3358
Joined: Sat Jul 01, 2006 6:59 am

Post » Mon Jun 18, 2012 9:55 am

Yup everything is an object reference, so you have to have it "populated" via a property set to the instance.
User avatar
Naazhe Perezz
 
Posts: 3393
Joined: Sat Aug 19, 2006 6:14 am

Post » Mon Jun 18, 2012 3:38 am

Also, be careful with AddPerk. If you're adding perks to the player through script, that works fine. But the AddPerk command is broken and does not work for any actor other than the player.
User avatar
Phillip Brunyee
 
Posts: 3510
Joined: Tue Jul 31, 2007 7:43 pm


Return to V - Skyrim