Handling an Actor reference in Papyrus

Post » Thu Jun 21, 2012 10:29 pm

I've browsed the creation kit wiki and did a search on these forums but my google-fu is pretty weak. I need a handle on the courier and have run out of my own ideas on how to keep that handle in Papyrus.

Is there a method that takes an ID and returns an Actor reference?
User avatar
Jason Rice
 
Posts: 3445
Joined: Thu Aug 16, 2007 3:42 pm

Post » Thu Jun 21, 2012 11:47 am

To be more clear - what I'm specifically trying to do is add a letter to the inventory of the courier through a scrip

so my script would be something like

Actor courier = ****Missing this bit****...courier.AddItem( foo, bar, etc.)
User avatar
Heather Dawson
 
Posts: 3348
Joined: Sun Oct 15, 2006 4:14 pm

Post » Fri Jun 22, 2012 1:59 am

Declare the Actor you want to use as your courier as a property:

Actor Property MyCourier Auto

You define which actor you want the property to point to in the Creation Kit.

You can then do what you wish with the Courier. But you will need an Event to trigger the script (search Events in the CK Wiki and see which one fits best your needs).

And if I may suggest some reading: http://tesalliance.org/forums/index.php?/topic/5039-class-2-properties/ It's a tutorial on how properties work and what you use them for.
User avatar
Emily Shackleton
 
Posts: 3535
Joined: Sun Feb 11, 2007 12:36 am

Post » Thu Jun 21, 2012 3:06 pm

Thanks Thomas, I'll take a gander at it.
User avatar
Roy Harris
 
Posts: 3463
Joined: Tue Sep 11, 2007 8:58 pm


Return to V - Skyrim