Jump to content
We are aware aware of an issue with authentication on the site. See our status page for details. ×

Help with Teleport Script


Hatsodoom

Recommended Posts

Since I have no clue as to how scripting works, like at all, I need help making what many would likely consider a very simple teleport script. Simply put, when a button is activated I want the player to be teleported to a point within the same cell. Another object will be near the teleport point, which when activated will teleport them back. A simple "Point-A to Point-B, then from Point-B back to Point-A" sort of thing. Can anyone give me a script like that? Keep in mind to tell me what goes where, how to identify the teleport point in the script, etc because as I stated, I have NO IDEA how scripts work.

Link to comment
Share on other sites

As I remember, Teleport spells cannot be done in Skyrim in the same way they could in Morrowind with Mark/Recall and the Multimark mod.

 

I seem to recall someone did make one which could only work ether underground or overground and was a sort of fast travel thing. I'm not sure if a Mark had to be set first, but I do seem to remember that you could not teleport from below ground to above ground or vice versa.

 

You could try tracking that down and having a look at the scripts.

 

You would think that such a mod would need you to grab the co-ordinates of where you are and store them in a Mark spell and then later you could teleport back using something like player.moveto <RefID>, but it's beyond me. maybe someone else could be of more help.

 

 

A friend of mine who excels in unpublished house mods has something more like you mention, where he built a home at Riverwood, used a Dwemer Ruin for an underground HQ, an Aerie in the mountains, a Dwemer Tower and made a dungeon so that it could become your palace once you'd cleaned it out. In those homes there was a pedestal with a floating, rotating, swirling ball and when you clicked on it you could choose where to go and teleport to one of the other player homes. That was not just within a cell, it was all across Skyrim and basically was a doorway which led to each of the other four homes.

 

Now I am thinking about it, there was also a mod where you had some magick stone, and if you dropped it in your home you could used the other stone to teleport back to your player home from anywhere. I can't remember the name, though, sorry.

 

:confused:

Link to comment
Share on other sites

You just need a MoveTo script. Put a marker or something down that you can use as a target. Or use the teleport buttons you're talking about.

Event OnActivate(ObjectReference akActionRef)
   If akActionRef == Game.GetPlayer()
      akActionRef.MoveTo(ButtonB)  ;You can also add extra instructions if you don't want to be placed directly on top of it.
   EndIf
EndEvent

ObjectReference Property ButtonB Auto   ;This is the thing you want to teleport to. Don't forget to fill your properties. 

You probably want to make it prettier. You can play a visual effect, if you want. You can also play a sound, or do a fade to black.

Link to comment
Share on other sites

You just need a MoveTo script. Put a marker or something down that you can use as a target. Or use the teleport buttons you're talking about.

Event OnActivate(ObjectReference akActionRef)
   If akActionRef == Game.GetPlayer()
      akActionRef.MoveTo(ButtonB)  ;You can also add extra instructions if you don't want to be placed directly on top of it.
   EndIf
EndEvent

ObjectReference Property ButtonB Auto   ;This is the thing you want to teleport to. Don't forget to fill your properties. 

You probably want to make it prettier. You can play a visual effect, if you want. You can also play a sound, or do a fade to black.

This is perfect, thank you.

 

Edit: Ok I can't get the script to work and honestly I have no idea what I'm doing wrong. I press the button, nothing happens. Tried several different activate objects, nothing works.

 

Edit 2: Ok so apperently you left out a step. I had to right-click the script and edit the property by setting the ObjectReference there. I thought I was doing that in the script itself, but I guess not. On the plus side this allowed me to discover I only need the one script for any object-activated player-teleport I need. Thanks man.

Edited by Hatsodoom
Link to comment
Share on other sites

Or even easier on an Activator:

 

Scriptname TeleportSomewhereScript extends ObjectReference

ObjectReference Property TargetLocation Auto

Event OnActivate(ObjectReference akActionRef)
Game.GetPlayer().MoveTo(TargetLocation)
EndEvent

 

You don't need an If..then because there's nobody else to activate this.

Link to comment
Share on other sites

Here's one I've used by Darkfox127, you pop the script into a favorite Magical Effect and walla you've got a nice little Effect before you teleport to a marker you've setup.

 

Scriptname DovakiinTeleportTargetScript extends activemagiceffect

ObjectReference Property Loc01 Auto ;location of where you are teleporting too.

Event OnEffectStart(Actor akTarget, Actor akCaster)
Utility.Wait(1.5); just a pause while the magiceffect activates
Game.FadeOutGame(False, True, 2.0, 1.0);you fade then buff you're gone
akTarget.Moveto(Loc01);Location where you are teleporting too.
EndEvent

 

I've expanded this little script into menu's, activators and triggers so its a great little script and I owe it all to Darkfox127. He has some great Tut's on youtube and some great mods as well.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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