Jump to content

Teleport to Nearest Marker


ak0d

Recommended Posts

Hi everyone.

 

I am currently in the planning stages for a mod. I won't get into the details, but the critical feature is a script that should do the following:

 

On a trigger, teleport the player to the nearest xmarker, from a list of custom xmarkers.

 

In practice, it should work like the Almisivi/Divine Intervention spells did in Morrowind. No matter where the player is on the map, they will be teleported to the nearest temple.

 

It could also work in the following way: checking the current hold (region), and teleporting to the marker in that hold (rather than the nearest one, which may be in another hold). e.g Player is in Falkreath Hold, they are teleported to the Falkreath marker, even if they are technically closer to Whiterun.

 

For other worldspaces, a specific marker can be set (e.g player in the Soul Cairn is teleported to Volkihar Castle; player in Solstheim to Raven Rock, etc). If no "nearest marker" is detected (I guess this would happen in a worldspace that has no specific custom marker for it unlike the two listed above), the player can be teleported to a random marker from the list. This is the fallback. For quest-critical areas like Japhet's Folly, Sovngarde, or Skuldafn, the script will simply not fire until the player returns to a valid location.

 

Now I've poked around a bit in the CK. The problem is that most exterior cells in Skyrim are called Wilderness, and so apart from manually assigning each cell to a Hold, which will take forever, there seems to be no way to determine the player's current region (unlike Morrowind, which had regions demarcated in the CS).

 

Is there some way to check the current Location object (I notice that most areas have a "parent" Location, which is indeed usually a Hold)? Something like .getCurrentParentLocation?

 

How could I do this?

Edited by ak0d
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...