Andyno Posted January 4, 2021 Share Posted January 4, 2021 As the title says, I'm trying to disable a reference that is located in a different worldspace. This is the situation:The player activates a vertibird (located in Commonwealth) that will transport (teleport) him to my custom worldspace, however this is a one way ticket - as soon as player arrives, he will not be able to go back until he finishes the mod. Then he may come to the vertibird again, but actually the vertibird shouldn't be there because it was left in the arrival worldspace. So, what is the best option to achieve this? Should I put it in the initial vertibird script, or should I put a trigger at the arrival spot? BTW, this is the vertibird script I currently have: Scriptname TZStartVertibirdScript extends ObjectReference Message Property TZStartVertibirdMessage Auto ObjectReference Property TZStartVertibirdMarkerRef Auto Actor Property PlayerRef auto Sound Property MySound Auto Event OnActivate(ObjectReference refAction) ObjectReference refPlayer = Game.GetPlayer() Int Button = TZStartVertibirdMessage.Show() If Button == 0 MySound.Play(PlayerRef) PlayerRef.MoveTo(TZStartVertibirdMarkerRef) Endif EndEvent Link to comment Share on other sites More sharing options...
Deleted77601483User Posted January 4, 2021 Share Posted January 4, 2021 So you want the vertibird to become disabled after you activate it and get teleported to the other worldspace?If so, the easiest way would probably be to just add a Disable()after you move the player in the papyrus script. Then if you need the vertibird again, you just need to call Enable()on it. Link to comment Share on other sites More sharing options...
Andyno Posted January 4, 2021 Author Share Posted January 4, 2021 Yes, but I want it to disable after the teleportation process, so the vertibird didn't dissapear before player's eyes. So you're saying that just below the line "PlayerRef.MoveTo(TZStartVertibirdMarkerRef)" I should place only "Disable()"? Link to comment Share on other sites More sharing options...
Deleted77601483User Posted January 4, 2021 Share Posted January 4, 2021 I can't remember if the teleportation screen appears instantly but if it does you should be fine with just putting the disable function after the moveto. If the teleport load screen fades in, you could try putting in a Utility.Wait or using a timer to make the script wait for a couple seconds after the teleport before disabling. But yeah, if the teleport load screen is instant, you should be fine with putting the Disable() below the PlayerRef.MoveTo(...) Link to comment Share on other sites More sharing options...
Andyno Posted January 4, 2021 Author Share Posted January 4, 2021 I put the "Disable()" below "PlayerRef.MoveTo(TZStartVertibirdMarkerRef)", but it doesn't work - the vertibird is still here after teleportation. Link to comment Share on other sites More sharing options...
Zorkaz Posted January 4, 2021 Share Posted January 4, 2021 Don't forget to use the "Must Perist" keyword on the vertibird. Esl and esms don't have every object loaded, so disable might fail Link to comment Share on other sites More sharing options...
Andyno Posted January 4, 2021 Author Share Posted January 4, 2021 Doesn't work either. I suppose you mean Keywords section located in the lower left corner of the Activator window... right? Link to comment Share on other sites More sharing options...
SKKmods Posted January 4, 2021 Share Posted January 4, 2021 Having a non Const flagged script attached *should* make the reference persistent. You need to debug log the state of your object at the time of disable toi see what is happening; Debug.Trace("TZStartVertibirdScript.Disable before" + Self + " Is3dLoaded " + Self.Is3dLoaded() + " Enabled " + Self.IsEnabled() ) Self.Disable() Debug.Trace("TZStartVertibirdScript.Disable after " + Self + " Is3dLoaded " + Self.Is3dLoaded() + " Enabled " + Self.IsEnabled() ) Link to comment Share on other sites More sharing options...
Zorkaz Posted January 4, 2021 Share Posted January 4, 2021 Did you use self.disable()? Link to comment Share on other sites More sharing options...
Andyno Posted January 4, 2021 Author Share Posted January 4, 2021 Zorkaz:I just tried self.disable() with and without MustPersist - none of it is working. SKK50:How should I use this debug stuff? Should I put it into my script, or copy/paste it into command line? Sorry, but I'm seeing such thing for the first time. :ohmy: Link to comment Share on other sites More sharing options...
Recommended Posts