Detecting current region

Post » Wed Apr 02, 2014 11:53 am

Hey all is it possible to detect what region/hold the player is currently in? Either script or condition function will do.

IsPlayerInRegion exists but has no notes. Does anybody know if this works?
User avatar
Alex Blacke
 
Posts: 3460
Joined: Sun Feb 18, 2007 10:46 pm

Post » Wed Apr 02, 2014 11:08 am

There's IsInSameCurrentLocAsRef which can check any level of location depending on the keyword passed in (LocTypeHold, LocTypeTown...). Examples show it called on the player. You'd need static ref's to check against - it's intended for use with characters that can move around, but the simple case should work, too.

Then again, IsInLocation is even easier. GetCurrentLocation returns a location, but then you have to check it against all the alternatives.

I couldn't find anything that returns a name string for use in messages, for example.
User avatar
Roanne Bardsley
 
Posts: 3414
Joined: Wed Nov 08, 2006 9:57 am

Post » Wed Apr 02, 2014 5:07 am

Thanks mate. If IsPlayerInRegion works I'll be turning it into a scripting function using story manager and a handful of logic quests.
User avatar
Alyce Argabright
 
Posts: 3403
Joined: Mon Aug 20, 2007 8:11 pm


Return to V - Skyrim