Storing Multiple References?

Post » Fri Feb 18, 2011 7:14 pm

Is it possible to store multiple actor references with getself?

If I set NPC1 to getself

Can I set npc2 to getself or will npc1 be overridden?

I think I had trouble with storing multiple references before but I'm not entirely sure that was it. I just want to be sure that it isn't going to be a problem. If you can't store multiple references is there a workaround for it?
User avatar
le GraiN
 
Posts: 3436
Joined: Thu Mar 22, 2007 6:48 pm

Post » Sat Feb 19, 2011 8:18 am

You should be able to store multiple references, yes.
User avatar
Krystina Proietti
 
Posts: 3388
Joined: Sat Dec 23, 2006 9:02 pm

Post » Sat Feb 19, 2011 1:48 am

But you have to consider WHERE you store them.

If you want to store multiple refs, you must have multiple places to store them, of course.
User avatar
lolli
 
Posts: 3485
Joined: Mon Jan 01, 2007 10:42 am

Post » Sat Feb 19, 2011 4:23 am

Ok, I think I understand, let me run this by you real fast.

If I have a script that gets an actors references and stores in another script that has already used getself to store an actor reference, can both those references exist in the same script if they're stored as npc1 and npc2?
User avatar
hannaH
 
Posts: 3513
Joined: Tue Aug 15, 2006 4:50 am

Post » Sat Feb 19, 2011 3:02 am

If by npc1 and npc2 you mean that the holding scrip has two ref vars named npc1 and npc2, the answer is yes, you may store as many different references (or FormIDs) as you have ref vars to hold them.

Getself is just one of the many ways to fill those ref vars, btw.
User avatar
Rebecca Clare Smith
 
Posts: 3508
Joined: Fri Aug 04, 2006 4:13 pm

Post » Sat Feb 19, 2011 9:43 am

really? What are some other ways?
User avatar
Isabel Ruiz
 
Posts: 3447
Joined: Sat Nov 04, 2006 4:39 am

Post » Fri Feb 18, 2011 6:46 pm

Any function that returns a reference FormID, like GetFirstRef/GetNextRef, PlaceAtMe, and GetCrosshairRef.
Other functions return other kinds of FormIDs, like GetBaseObject, GetParentCell and GetHorse
User avatar
carly mcdonough
 
Posts: 3402
Joined: Fri Jul 28, 2006 3:23 am


Return to IV - Oblivion