how to tell if player is in a dungeon or on the surface

Post » Sat Jul 18, 2015 12:29 am

Hi,

I know we can use:

If !((GetPlayer().GetParentCell()).IsInterior()) 

and most of the time it works fine. Except if you are near a dungeon entrance on the surface. It will say you are in an interior even If you are not. Is there a workaround? perhaps checking for the location of the player versus center of skyrim? I recall vaguely that checking for distance between the player and middle of skyim would return a number in the millions if the player was inside a dungeon.

Any help appreciate, need this for Genesis and the blasted spiders so I can tell wether I can spawn them.

Tony

Sands of Time team member

User avatar
Spaceman
 
Posts: 3429
Joined: Wed May 23, 2007 10:09 am

Post » Sat Jul 18, 2015 12:38 pm

Check is in interior and location.has keyword LocTypeDungeon

Those two if checks should give you good results.
User avatar
Charlotte Buckley
 
Posts: 3532
Joined: Fri Oct 27, 2006 11:29 am


Return to V - Skyrim