Possible to use GetNextRef on a cell that the player is not

Post » Mon Nov 08, 2010 11:17 am

GetNextRef appears to only work on the cell the player is currently in; I've tried WorldSpaceId.GetNextRef but it doesn't do anything.

Anyone know?
User avatar
Svenja Hedrich
 
Posts: 3496
Joined: Mon Apr 23, 2007 3:18 pm

Post » Mon Nov 08, 2010 9:16 am

Yes, that is the way it is supposed to work.

You may use GetFirstRefInCell to check other cells, subject to the restrictions on the OBSE doc.
User avatar
Eve(G)
 
Posts: 3546
Joined: Tue Oct 23, 2007 11:45 am

Post » Sun Nov 07, 2010 11:42 pm

Yes, that is the way it is supposed to work.

You may use GetFirstRefInCell to check other cells, subject to the restrictions on the OBSE doc.


Yeah I've tried using it but it doesnt' work.

I've tried GetFirstRefInCell ICWaterfrontShackForSale 27. This is supposed to find the Misc items but it doesnt, it gives me nothing.

It only works if I use GetFirstRef and put the player in the Shack.

EDIT: It will work with GetFirstRefInCell but the player has to be in the cell still.
User avatar
Charlotte Lloyd-Jones
 
Posts: 3345
Joined: Fri Jun 30, 2006 4:53 pm

Post » Mon Nov 08, 2010 5:07 am

You must be doing something wrong.

If the cell is not loaded, GetFirstRefInCell will return only persistent references.
It just happens that there is a plate in ICWaterfrontShackForSale that is persistent and GetFirstRefInCell does return it.

The code I used:
set reff to GetFirstRefInCell  ICWaterfrontShackForSale 27while reff  printc " Found %i %n" reff reff   set reff to getnextrefloop

User avatar
emma sweeney
 
Posts: 3396
Joined: Fri Sep 22, 2006 7:02 pm

Post » Mon Nov 08, 2010 6:11 am

You must be doing something wrong.

If the cell is not loaded, GetFirstRefInCell will return only persistent references.
It just happens that there is a plate in ICWaterfrontShackForSale that is persistent and GetFirstRefInCell does return it.

The code I used:
set reff to GetFirstRefInCell  ICWaterfrontShackForSale 27while reff  printc " Found %i %n" reff reff   set reff to getnextrefloop



Ah I see thanks, yeah the things I'm trying to check are not persistant references so I guess where it is messing up, didn't think about that.

I guess there is no way around it than to be in the house at the time.
User avatar
Elea Rossi
 
Posts: 3554
Joined: Tue Mar 27, 2007 1:39 am


Return to IV - Oblivion