How to get the cell where a NPC

Post » Wed Dec 30, 2009 1:27 pm

I need to know the cell where is a NPC.

How?
User avatar
Emerald Dreams
 
Posts: 3376
Joined: Sun Jan 07, 2007 2:52 pm

Post » Wed Dec 30, 2009 2:48 pm

?
Do you mean, you want to go the cell that has a specific NPC in it?

Find the NPC in the list (under the NPC tab)
Right click, select Info.
The cell name will be displayed in that window, and you can double click the cell name to go to directly to the NPC in that cell.
User avatar
biiibi
 
Posts: 3384
Joined: Sun Apr 08, 2007 4:39 am

Post » Wed Dec 30, 2009 11:01 am

I am not sure what you are getting at, could you please explain a bit more? You need to know what cell has a specific NPC? If so, what NPC are you looking for?
User avatar
Jaki Birch
 
Posts: 3379
Joined: Fri Jan 26, 2007 3:16 am

Post » Wed Dec 30, 2009 12:02 pm

I want a script funtion like GetPcCell, but for NPC's.
User avatar
Jessica Stokes
 
Posts: 3315
Joined: Fri Jul 28, 2006 11:01 am

Post » Wed Dec 30, 2009 7:24 pm

I want a script funtion like GetPcCell, but for NPC's.


The MWSE function xMyCellID returns a string containing the calling object's cell ID. I don't believe there's any other way to do just what you asked.
User avatar
Dawn Farrell
 
Posts: 3522
Joined: Thu Aug 23, 2007 9:02 am

Post » Wed Dec 30, 2009 9:40 am

I need to know the cell where is a NPC.

How?
You could compare X Y coordinates, something like this
begin exampleScriptfloat x1float y1set x1 to ( Fargoth->GetPos X )set y1 to ( Fargoth->GetPos Y ); test if in cell -2, -9if ( x1 >= -16384 )  ; -2 * 8192	if ( x1 < -8192 ) ; -1 * 8192		if ( y1 >= -73728 )  ; -9 * 8192			if ( y1 < -65536 ) ; -8 * 8192				MessageBox "Fargoth is in cell -2 -9"			endif		endif	endifendifend

User avatar
A Lo RIkIton'ton
 
Posts: 3404
Joined: Tue Aug 21, 2007 7:22 pm


Return to III - Morrowind