GetPCCell

Post » Sat May 28, 2011 7:34 am

Can GetPCCell check for an exact exterior cell (like for instance "0,0" or "-3,8"), or can it only check for the naming (like just "Bitter Coast").
User avatar
Alan Whiston
 
Posts: 3358
Joined: Sun May 06, 2007 4:07 pm

Post » Sat May 28, 2011 4:09 am

getpccell works for cell name (such as "bitter coast"), getpos will give you your coordinates. usage is like this -

player->getpos x

or

mynpc->getpos y

http://www.uesp.net/wiki/Tes3Mod:GetPos

http://www.uesp.net/wiki/Tes3Mod:GetPCCell
User avatar
suzan
 
Posts: 3329
Joined: Mon Jul 17, 2006 5:32 pm

Post » Sat May 28, 2011 4:52 am

Can GetPCCell check for an exact exterior cell (like for instance "0,0" or "-3,8"), or can it only check for the naming (like just "Bitter Coast").
Naming (partial, so GetPCCell "Balmora" will be true both for "Balmora" and "Balmora, Caius Cosades House".
You can simulate cell coordinates check though, as a cell is 8192 units. Something like this should work
begin celltestScript; we want tho check if we are for instance in cell -3, 8float templong x1long y1set temp to ( player->GetPos X )  ; unitsset temp to ( ( temp / 8192 ) + 0.5 ) ; cellsset x1 to temp  ; truncatedset temp to ( player->GetPos Y )set temp to ( ( temp / 8192 ) + 0.5 )set y1 to tempif ( x1 == -3 )	if ( y1 == 8 )		MessageBox "You are in cell %g, %g" x1 y1	endifendifend

User avatar
Mr. Ray
 
Posts: 3459
Joined: Sun Jul 29, 2007 8:08 am


Return to III - Morrowind