KL0UDI Posted June 3, 2019 Share Posted June 3, 2019 (edited) THIS SCRIPT WAS SENT TO ME AND I DONT KNOW MUCH ABOUT SCRIPTING TO FIX ISSUE SOMETHING IS WRONG WITH IT WONT COMPILE.... ITS POST BE A SCRIPT TO TELEPORT U TO A CELL AND LEAVE A MARKER SO YOU CAN TELEPORT BACK TO WHERE U CAST IT LAST BUT ITS NOT WORKING SO U KNOW WHATS WRONG WITH IT??? Actor Property Player Auto ObjectReference Property ReturnMarker Auto ObjectReference Property DestinationMarker Auto VisualEffect Property FX Auto Location Property Home Auto ;Teleportation script for the spell Event OnEffectStart(Actor AkTarget, Actor AkCaster) if AkCaster == Player if Player.GetInCurrentLoc(Home) == 0 ReturnMarker.MoveTo(Player) FX.Play(Player) Utility.Wait(1.0) Game.EnableFastTravel() Game.FastTravel(DestinationMarker) Utility.Wait(3.0) FX.Stop(Player) endif endif if Player.GetInCurrentLoc(Home) == 1 Debug.Notification("I'm already home.") endif EndEvent ALSO THIS WAS THE RETURN SCRIPT THAT CAME WITH IT.. I KINDA WANNA CHANGE IT TO SPELL DNT KNOW HOW Actor Property Player Auto ObjectReference Property ReturnMarker Auto VisualEffect Property FX Auto ;Return script for the door Event OnActivate(ObjectReference AkActionRef) if AkActionRef == Player FX.Play(Player) Utility.Wait(1.0) Game.EnableFastTravel() Game.FastTravel(ReturnMarker) Utility.Wait(3.0) FX.Stop(Player) endif EndEvent Edited June 3, 2019 by KL0UDI Link to comment Share on other sites More sharing options...
ZeroCore Posted June 5, 2019 Share Posted June 5, 2019 This might sound dumb at first, but I want to make sure that every last thing is set up before I try to pick apart the scripts. Firstly, did you make sure that the spells that uses these scripts are set up properly (that casting types match up, and so on)? Secondly, did you make sure (double check this) that the scripts' properties are filled out correctly (and that that file hasn't bugged up and "forgotten" them)? Link to comment Share on other sites More sharing options...
Ghaunadaur Posted June 5, 2019 Share Posted June 5, 2019 (edited) GetInCurrentLoc is a condition function. For Papyrus script you need to use GetCurrentLocation or IsInLocation . Edited June 5, 2019 by Ghaunadaur Link to comment Share on other sites More sharing options...
KL0UDI Posted June 5, 2019 Author Share Posted June 5, 2019 (edited) This might sound dumb at first, but I want to make sure that every last thing is set up before I try to pick apart the scripts. Firstly, did you make sure that the spells that uses these scripts are set up properly (that casting types match up, and so on)? Secondly, did you make sure (double check this) that the scripts' properties are filled out correctly (and that that file hasn't bugged up and "forgotten" them)?i had everything set up like normaly b4 u write in the script then i put in the script like u would any other ways and wont compile.....i used another teleport script to make sure everything was set up for the script and everything was set up correctly Edited June 5, 2019 by KL0UDI Link to comment Share on other sites More sharing options...
KL0UDI Posted June 5, 2019 Author Share Posted June 5, 2019 GetInCurrentLoc is a condition function. For Papyrus script you need to use GetCurrentLocation or IsInLocation . the wiki confuses me easy so its harder for me to do scripts... so u kinda lost me lol sorry Link to comment Share on other sites More sharing options...
Ghaunadaur Posted June 5, 2019 Share Posted June 5, 2019 I've made some modifications to the script, so it will compile now. But not tested. Scriptname SomeName extends ActiveMagicEffect Actor Property Player Auto ObjectReference Property ReturnMarker Auto ObjectReference Property DestinationMarker Auto VisualEffect Property FX Auto Location Property Home Auto ;Teleportation script for the spell Event OnEffectStart(Actor AkTarget, Actor AkCaster) if AkCaster == Player if Player.IsInLocation(Home) Debug.Notification("I'm already home.") else ReturnMarker.MoveTo(Player) FX.Play(Player) Utility.Wait(1.0) Game.EnableFastTravel() Game.FastTravel(DestinationMarker) Utility.Wait(3.0) FX.Stop(Player) endif endif EndEvent As zeroCore already mentioned, make sure to fill in the property values. Link to comment Share on other sites More sharing options...
ZeroCore Posted June 6, 2019 Share Posted June 6, 2019 and like Ghaunadaur mentioned, you should use GetCurrentLocation or IsInLocation. Link to comment Share on other sites More sharing options...
KL0UDI Posted June 6, 2019 Author Share Posted June 6, 2019 I've made some modifications to the script, so it will compile now. But not tested. Scriptname SomeName extends ActiveMagicEffect Actor Property Player Auto ObjectReference Property ReturnMarker Auto ObjectReference Property DestinationMarker Auto VisualEffect Property FX Auto Location Property Home Auto ;Teleportation script for the spell Event OnEffectStart(Actor AkTarget, Actor AkCaster) if AkCaster == Player if Player.IsInLocation(Home) Debug.Notification("I'm already home.") else ReturnMarker.MoveTo(Player) FX.Play(Player) Utility.Wait(1.0) Game.EnableFastTravel() Game.FastTravel(DestinationMarker) Utility.Wait(3.0) FX.Stop(Player) endif endif EndEvent As zeroCore already mentioned, make sure to fill in the property values.sweet question tho this is just to teleport u to "home" and just place a marker for a return which i would need a return script for? or is this there and back script? wasnt to sure from the start what the sccript fully done i mention to this person who sent it to me but he never explain what all the script excatly does...im a noob and a half when its scripting Link to comment Share on other sites More sharing options...
Ghaunadaur Posted June 6, 2019 Share Posted June 6, 2019 The first script will only move the ReturnMarker to the current location and teleport to the DestinationMarker. The second script is supposed tp bring the player back, but it looks like it's made for some sort of activator. If you want to use it for a spell, you should perhaps add a condition, so there's a check whether the player is in the 'Home' location. Scriptname AnotherName extends ActiveMagicEffect Actor Property Player Auto ObjectReference Property ReturnMarker Auto VisualEffect Property FX Auto Location Property Home Auto ;Return script Event OnEffectStart(Actor AkTarget, Actor AkCaster) if AkCaster == Player && Player.IsInLocation(Home) FX.Play(Player) Utility.Wait(1.0) Game.EnableFastTravel() Game.FastTravel(ReturnMarker) Utility.Wait(3.0) FX.Stop(Player) else debug.trace("Not at home") endif EndEvent Again it's not tested, don't have the time for that, but *in theory* it should work. :tongue: Link to comment Share on other sites More sharing options...
KL0UDI Posted June 7, 2019 Author Share Posted June 7, 2019 thanks alot that script bugged the F outta me for awhile Link to comment Share on other sites More sharing options...
Recommended Posts