Jump to content

Teleport Script Redux


TyrisBel

Recommended Posts

Hello and welcome to my regular cry for help. Today, we're revisiting an old friend, the teleport script. I wanted teleport stones in my player house to transport the player to various cities, with the help of someone more knowledgeable than me. This is what I ended up using:

 

Scriptname TeleP_Riften extends ObjectReference  

ObjectReference Property TeleportMarker auto
Event OnActivate(ObjectReference akActionRef) 
Game.GetPlayer().MoveTo(TeleportMarker)
EndEvent

 

Now I could only get this to work if I created nine identical scripts, only named for each city, if I didn't do that, it teleported you into blue nothingness. So I did that, and it worked...for a while. I moved on to other things in my house mod, but have now noticed its not working again. It still teleports you into the Tamriel world without problems, so Falkreath, Winterhold, Morthal and Dawnstar are not an issue. But any of the cities that have their own world space I just get teleported into blue nothingness. I have no idea why and it's driving me mad, anyone know what I'm doing wrong? and surely there's a way to do this as a single script and just change the variables/properties for each activator?

 

Also, if anyone knows how I could check to see if the player has traveled to the city in question and if they have not, then get the message "You can only teleport to cities you have already visited" instead of being teleported. Finally, it would also be really nice if your follower came with you, as currently they don't. If anyone can help with any of this I would be really grateful

Link to comment
Share on other sites

Wouldn't it be much simpler and more stable to just use a teleport door (using the stone mesh)? You don't need scripts at all if you are using a separate stone for each destination.

 

I have a fast travel system in my player house mod that I am currently working on that lets you push a city logo button to select your destination and you use what appears to be the same door. Rather neat and uses a single simple script to make everything work.

Link to comment
Share on other sites

No, you place the door object under the ground and stick the destination marker up in the city where you want it. Its a 1 way trip that way, if thats what you are after. Ever heard of the acronym KISS? (Keep It Simple Stupid) :wink:
Link to comment
Share on other sites

  • Recently Browsing   0 members

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