How to get the current cell in Papyrus ?

Post » Mon Nov 19, 2012 3:07 pm

Hi guys,

quick question. I would like to know how to retrieve the current cell of the player using Papyrus ?

Basically something that would have been coded in Oblivion

player.GetInCell

There's no getCell, getCurrentCell on Actor... From what I found in this forum, it seems it's not possible and there's a workaround, but I can't find that workaround. Also, I can't use a workaround based on entering the cell, since the player might not have left it...

There's certainly a solution since you have getInCell as condition and console command. I just can't find it.

thanks !
User avatar
Chris Duncan
 
Posts: 3471
Joined: Sun Jun 24, 2007 2:31 am

Post » Mon Nov 19, 2012 1:59 pm

Cell kCELL = PlayerREF.GetParentCell()

http://www.creationkit.com/GetParentCell_-_ObjectReference is a member of ObjectReference, but since Actor extends ObjectReference, it's inherited.
User avatar
Matthew Barrows
 
Posts: 3388
Joined: Thu Jun 28, 2007 11:24 pm

Post » Mon Nov 19, 2012 4:05 am

That's just very simple ;) I don't know why I thought parentCell was about cells hierarchy or something.

thanks a lot !
User avatar
Stephanie I
 
Posts: 3357
Joined: Thu Apr 05, 2007 3:28 pm


Return to V - Skyrim