Teleport Recall

Revision as of 21:53, 27 May 2007 by imported>Wrye (Marker Rat)

WGS_Dev913 11:49 PM November 3 (EDT) I was wondering if anyone knows how to make a script to teleport the player from Tamriel or an interior cell, to a new worldspace, and back to the exact spot the player teleported from. I tried using X Marker References but for some reason each time I try to use the recall spell to bring the player back where he was, it sends him to the Coordinates he'd be standing in the Tamriel worldspace, but staying in the new worldspace. I dont know what the problem is. Is the X Marker not switching between worldspaces like it should? Or is it moving correctly and just a problem with the script? Heres an example of the scripts if that helps (sorry if its formatted wrong im not used to Wiki yet)


scn Teleport

Begin ScriptEffectStart

if(GetInWorldSpace BlankRealm) Player.MoveTo TeleportRef else

Ref RecallRef

RecallRef for bringing the player back to where he was

RecallRef.MoveTo Player 0 0 5 Player.MoveTo TeleportRef 0 0 5 endIf

End


scn Recall

Begin ScriptEffectStart

if(GetInWorldSpace BlankRealm) MoveTo RecallRef 0 0 5 else

player.Message "You cannot use that here."

endif


End

My MOD, The Lost Telvanni Codex, has both recall and true-recall spells. RecallRef has to be a static marker. That is in the CS you have to copy an existing one (name it), put in the world somewhere then use it's refID directly. You would have to do the same thing if you used, eg., an item to achieve the same effect. You may have some timing issues too - I did. GuidoBot 03:22, 4 November 2006 (EST)

Marker Rat

A teleport recall is quite popular for use with pocket dimensions, mobile tents, etc., but can also be used for multimark. The basic solution is to define a persistent ref object, place it at the mark point, and then later use moveto to return the player to that point.

Usually an XMarker static is used as the mark/recall point. The static is placed somewhere, given a name and then move to the player for mark and has the player move to it for recall. In my experience this seems to work fine for pocket dimensions, but for my Wrye Shivering mod which has a two ended portal (one end in Shivering Isles, other end anywhere outside of SI) it has major problems -- which are essentially those described by WGS. I don't know the exact details, but after quitting/reloading the moved marker often seems to snap back to its original worldspace (or interior cell) while keeping its new x,y,z position -- often this leaves you in some ordinarily out of reach part of the original worldspace/cell. Oddly, this does not seem to occur for markers moved within various tamriel worldspaces, but does occur for markers moved between SI worldspaces, and for markers originally in Tamriel that have been moved out of tamriel.

It seems that the problem is related to the game not really expecting statics and other types of objects (doors, etc.) to move. So, solution: Use a creature or npc marker instead (which are expected/allowed to move). What I did:

  • Started with a standard rat
  • Enabled low level processing and set health to zero. (Don't know if this is necessary, but seemed a good idea.)
  • Saved as new object.
  • Placed rat references, and generally treated the same way as an xmarker, except I also arranged for script to disable it.

So far (30 minutes testing) looks good. --Wrye 21:53, 27 May 2007 (EDT)