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

Post » Tue Dec 06, 2011 9:29 pm

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
Manuela Ribeiro Pereira
 
Posts: 3423
Joined: Fri Nov 17, 2006 10:24 pm

Post » Wed Dec 07, 2011 12:35 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
Rhysa Hughes
 
Posts: 3438
Joined: Thu Nov 23, 2006 3:00 pm

Post » Tue Dec 06, 2011 8:27 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
Cameron Wood
 
Posts: 3384
Joined: Wed Oct 31, 2007 3:01 pm

Post » Tue Dec 06, 2011 8:13 pm

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
Kayla Bee
 
Posts: 3349
Joined: Fri Aug 24, 2007 5:34 pm

Post » Tue Dec 06, 2011 12:21 pm

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
Jack Walker
 
Posts: 3457
Joined: Wed Jun 06, 2007 6:25 pm


Return to IV - Oblivion