JBrightstar Posted March 3, 2014 Share Posted March 3, 2014 Hi there. I'm currently working on a player house mod, and what I'd like to do is have an activator in the Tamriel worldspace teleport me to the Interior, and vice versa. The same functionality as a door, essentially. But I can't work out how to do this. I've tried mimicking the process used to make the Boat to Castle Volkihar but I can't seem to make that work here. If anyone could take the time to help me out, or even just point me to a relevant tutorial, I'd appreciate it. Link to comment Share on other sites More sharing options...
DragonDude1029 Posted March 3, 2014 Share Posted March 3, 2014 Simple as: Scriptname ExampleTeleporter extends ObjectReference ObjectReference property TeleportMarker auto Event OnActivate(ObjectReference akActivator) akActivator.MoveTo(TeleportMarker) EndEvent Attach the script to your object that is activated. Place a marker where you want the player to go and set the property TeleportMarker to that. This above script will make anything that activates the object teleport to TeleportMarker. If you want to limit it to the player put an if condition around the MoveTo line that checks to see if akActivator is the player. Link to comment Share on other sites More sharing options...
JBrightstar Posted March 3, 2014 Author Share Posted March 3, 2014 Wow, thanks. I'll give that a go! Quick follow up question though; will that also teleport the follower, just like a regular load door would? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 3, 2014 Share Posted March 3, 2014 No that will not teleport the follower automatically with the player. However, it might if you tell the follower to activate the object. Link to comment Share on other sites More sharing options...
JBrightstar Posted March 3, 2014 Author Share Posted March 3, 2014 Ah, that's a shame. I was aiming more to have something that works like a normal load door. Thanks anyway though! Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 3, 2014 Share Posted March 3, 2014 Oh something could be done, but the script would need adjustment. I do have a working teleport script but it uses a trigger box as I had intended to make a entry area that looked like a summoning circle. It was capable of handling one follower. Let me look over my script and see what would need to be added to the above script which is for use with object activation. Link to comment Share on other sites More sharing options...
JBrightstar Posted March 3, 2014 Author Share Posted March 3, 2014 Oh, that would be great! I was attempting something similar myself (again, in an attempt to mimic the 'Boat Door' used to reach Castle Volkihar) but I couldn't get that working. Link to comment Share on other sites More sharing options...
DragonDude1029 Posted March 3, 2014 Share Posted March 3, 2014 (edited) Alternatively, what you could do is make a new Door form (in the Object Window). Give it a unique editor id, uncheck all the flags, and set the model to whatever piece of clutter you like. It could be any piece of clutter really, whatever suits what you are trying to do. Doesn't have to be a door model either. Also, there does not need to be any scripts attached to the new Door object. You can also set sounds that play when you teleport by setting the Open field. Drag the Door into the render window and start editing the reference (not the base form, the reference in the Render Window). Go to the Teleport tab and check the Teleport box. Set it up exactly as you would a normal door. Voila! NPCs should follow you through them as well! Edited March 3, 2014 by DragonDude1029 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 3, 2014 Share Posted March 3, 2014 I think DragonDude1029 has the right idea. Creating a unique door with a specific mesh would probably be preferable. However, if you still want, the following should work for a scripted object. Scriptname ExampleTeleporter extends ObjectReference ObjectReference property TeleportMarker auto Actor Property PlayerRef Auto ReferenceAlias[] Property Follower Auto Event OnActivate(ObjectReference akActivator) If akActivator == PlayerRef akActivator.MoveTo(TeleportMarker) Int FALength = Follower.Length Int FAIndex = 0 While FAIndex < FALength If Follower[FAIndex] Follower[FAIndex].MoveTo(TeleportMarker) EndIf FAIndex += 1 EndWhile EndEvent The Follower variable points to an array of reference aliases on a quest that you create which finds and fills aliases that match what you need to be true in a follower. Typically a specific faction value. The reason I added the array is so that you could transport more than one follower. Link to comment Share on other sites More sharing options...
JBrightstar Posted March 3, 2014 Author Share Posted March 3, 2014 So I did as Dragondude suggested and it worked perfectly. It looks like such an obvious solution, but it just never dawned on me to try making a new door. Stupid beginner mistakes eh? ;) Big thanks to both of you for helping me out. I'll definitely take note of that script and see if I can learn a thing or two for the future though. Thanks again! Link to comment Share on other sites More sharing options...
Recommended Posts