Want to link two objects in a papyrus script

Post » Wed Jun 20, 2012 2:02 am

Hi,
I need to make a reference from one ObjectReference ( A ) to another one ( B ) (I believe that B would be just Actor on what I need but can be dead) and obtain the linked one ( B ) anytime I want starting from A. I need to do this to a vanilla object so extending that object's script with something like linkActor(Actor) and getLinkedActor() I believe won't do for me (or can I?).
I was looking at ObjectReference#GetLinkedRef(Keyword) but can't find a setter for that using Papyrus or the way to do it.
Also took in consideration ObjectReference#setActorCause(Actor) but can't find a getter for that, assuming I can use this for any object not only traps as I noticed it's usage and won't mess something else.
Any way to do this?
Thanks
User avatar
Vicki Blondie
 
Posts: 3408
Joined: Fri Jun 16, 2006 5:33 am

Post » Tue Jun 19, 2012 7:54 pm

i'm not sure that i understood right, but an easy way to refer to another Reference in a script is to add a property to the script
ObjectReference Property OtherObject auto
Than "Edit Proprertis" from outside the script and select the reference you want to link
User avatar
Julie Ann
 
Posts: 3383
Joined: Thu Aug 23, 2007 5:17 am

Post » Wed Jun 20, 2012 1:03 am

http://forums.nexusmods.com/index.php?/topic/604390-want-to-link-two-objects-in-a-papyrus-script-script/ on the Nexus.

I'm guessing this has something to do with placing Actor names on briar hearts and soul gems?
If so the data structure is the least of your worries.
User avatar
Philip Rua
 
Posts: 3348
Joined: Sun May 06, 2007 11:53 am

Post » Wed Jun 20, 2012 5:27 am

http://forums.nexusmods.com/index.php?/topic/604390-want-to-link-two-objects-in-a-papyrus-script-script/ on the Nexus.

Sorry if that's against some policy I didn't know about. Yes, it's about soul gems in in a mod I work on but also I believe finding a good general approach would be good.
User avatar
roxanna matoorah
 
Posts: 3368
Joined: Fri Oct 13, 2006 6:01 am

Post » Wed Jun 20, 2012 2:04 am

I don't know if it's 'policy' either, but it's very annoying when spending time trying to decipher someones request, only to later find you could have saved yourself a lot of bother if you knew the full story. Mastocane could have saved his time if he'd known you'd already rejected a similar response in the other thread. We both offered useless advice as your first post was confusing.

You can also store NPC data in an items Owner field in some case too, but again I doubt that will work for what you want to achieve.
Someone here may have a eureka moment if you explain your aims.
User avatar
Dalton Greynolds
 
Posts: 3476
Joined: Thu Oct 18, 2007 5:12 pm

Post » Wed Jun 20, 2012 1:35 am

Sorry if I didn't made myself completly understood, I'm not a native English speaker. Yeah thought of owner tag too, but that will mark them as stollen and stuff I believe.
User avatar
Jack
 
Posts: 3483
Joined: Sat Oct 20, 2007 8:08 am


Return to V - Skyrim