soulbladex Posted December 18, 2013 Share Posted December 18, 2013 I have learned the scripting language fairly fast and I have developed a working teleport spell. Currently, I can cast the spell and it teleports me to a location that I have specified in the Creation Kit. My question is, is it possible to use the same spell (only modified) to teleport mt to where the crosshairs are currently pointed? Is there a way for referencing the crosshairs through the script? Current Script:ObjectReference Property TargetLocation AutoEvent OnEffectStart(Actor akTarget, Actor akCaster) Game.GetPlayer().MoveTo(TargetLocation) Game.EnableFastTravel() Game.FastTravel(TargetLocation) EndEvent Link to comment Share on other sites More sharing options...
pheo3309 Posted December 18, 2013 Share Posted December 18, 2013 Try looking at various spell packages on the Nexus. I can't be for certain if one had it or not, however there have been questions on here that had both "Yes" and "No" in the past. Good luck. Link to comment Share on other sites More sharing options...
Xander9009 Posted December 18, 2013 Share Posted December 18, 2013 Why are you moving the player and fast travelling? Anyway, I have yet to find a way to get the location the player is looking. However, using SKSE, there might be a way. But I don't think it would be a normal function. I think you'd have to make an SKSE plugin to manage that. This is speculation, however. Link to comment Share on other sites More sharing options...
Sylux113 Posted December 18, 2013 Share Posted December 18, 2013 You will have to create a location based spell as described on this page: http://www.sureai.de/development/tutorials/skyrim-creation-kit-location-based-spells/Just attach a script that moves the player to the xMarker and you should be fine. Link to comment Share on other sites More sharing options...
Sjogga Posted December 18, 2013 Share Posted December 18, 2013 (edited) First of, you should use Game.GetPlayer().MoveTo(TargetLocation) as using fast travel increases the time of the day while this does not. To teleport to the cross hair you need to make a missile spell. This spell uses a custom missile. The missile has a custom explosion assigned to it. The explosion spawns a custom activator. The activator has the teleport script attached to it: Actor Property PlayerRef Auto Event OnInit() PlayerRef.moveto(self) self.delete() ; thanks for reminding me EndEvent That's just the core of the script though. You can have it play special effects and do other stuff. Edited December 18, 2013 by Sjogga Link to comment Share on other sites More sharing options...
Sylux113 Posted December 18, 2013 Share Posted December 18, 2013 ^ The link I provided explains how to create such a spell ;-) Just remember to self.delete() the activator when you are finished. Link to comment Share on other sites More sharing options...
Xander9009 Posted December 18, 2013 Share Posted December 18, 2013 To whoever figured that out, that's a very creative solution. I've only used explosions to spawn things once, and that was for enchanting arrows. Thinking about it, though, of course that would work. Sometimes it's nice to be wrong :) Link to comment Share on other sites More sharing options...
monsto Posted July 20, 2019 Share Posted July 20, 2019 (edited) First of, you should use Game.GetPlayer().MoveTo(TargetLocation) as using fast travel increases the time of the day while this does not. To teleport to the cross hair you need to make a missile spell. This spell uses a custom missile. The missile has a custom explosion assigned to it. The explosion spawns a custom activator. The activator has the teleport script attached to it: Actor Property PlayerRef Auto Event OnInit() PlayerRef.moveto(self) self.delete() ; thanks for reminding me EndEvent That's just the core of the script though. You can have it play special effects and do other stuff.If you're still a Nexus regular, thought I'd tell you that your post here was clear and helpful even 6 years later. A bit of piddling and I was working straight away. Thanks! Edited July 20, 2019 by monsto Link to comment Share on other sites More sharing options...
Recommended Posts