LooseEnds Posted May 11, 2017 Share Posted May 11, 2017 hi All I've created a Skyrim map which has little activators where the location of major cities are, around skyrim. when activated they will teleport the player to that stones particular destination. Works fine but now I need a bit of coding to test if the player has discovered the destination they are going to teleport too, if they haven't a little message will come up saying something like "Undiscovered Not available" or if the test is true then the player will complete the Action. Its a simple Fast travel script that I use just needs that little bit of code to make the player still have to do all the walking, running and riding stuff to fine all these locations but once that's done its a matter of clicking the map and Walla your there. I've tried linking mapmarkers to the script but no luck. So Im hoping someone will have the code and be able to share it or be able to direct me in the direaction where I might be able to fine this mysterious bit of script code. Thanks Link to comment Share on other sites More sharing options...
KunoMochi Posted May 11, 2017 Share Posted May 11, 2017 Have the script check for this on the map marker:http://www.creationkit.com/index.php?title=IsMapMarkerVisible_-_ObjectReference This might also help:http://www.creationkit.com/index.php?title=CanFastTravelToMarker_-_ObjectReference Link to comment Share on other sites More sharing options...
LooseEnds Posted May 12, 2017 Author Share Posted May 12, 2017 Thanks for the head-up KunoMochi much appreciated. Took your advice and used "canFastTravelToMarker" worked great. Here how I used the expression: Scriptname PortalStoneActivatorScript extends ObjectReferenceObjectReference Property WinterholdMarkerRef Auto ;***Spell Property TeleportFX Autobool Property canFastTravel AutoEvent OnActivate(ObjectReference akActionRef) canFastTravel = WinterholdMarkerRef.CanFastTravelToMarker();*** IF canFastTravel == True;*** ; cast the flashy spell at whoever activated me TeleportFX.Cast(self, akActionRef) ; wait a bit while the effects play Utility.Wait(2.5) ; teleport whoever to the destination akActionRef.MoveTo(WinterholdMarkerRef) Game.EnableFastTravel() Game.FastTravel(WinterholdMarkerRef) Else Debug.notification("Sorry! Not Possible..") EndIFEndEvent where the " *** " are where I made the changes to the original code. Place my fasttravel code within the IF than Else statements an "Bob's your uncle" works fine. I'm not much of a computer software writer I do alot of copy and paste and a lot of hoping it works but got lucky here. But if their are any suggestion to make the code more efficient please make them. Thanks once again KunoMochi. Link to comment Share on other sites More sharing options...
Recommended Posts