Jump to content

Teleport Script: I don't get it


Zorkaz

Recommended Posts

I have a menu with two options for teleporting (On a book)

The teleport marker is an activator flagged with "MustPersist"

Yet when I teleport to the Commonwealth I get stuck and can't move.

 

Any ideas?

Event OnRead()
TeleportMarkerCommonwealth.moveto(PlayerRef)
 Int iButton = TMMapMenu.Show()
    If IButton == 0
PlayerRef.moveto(TeleportMarkerSwamp)
Elseif IButton == 1
PlayerRef.moveto(TeleportMarkerCommonwealth)

Endif
EndEvent

Edit: Appearantly it's because the book never closes so you get stuck

 

So new question: Any good ideas to solve this problem?

Link to comment
Share on other sites

For reference: A way that also not works is by creating a repeatable dummy quest with the menu in it

 

Book Script:

Quest Property TMBookQuest Auto

Event OnRead()
TMBookQuest.start()
EndEvent

Quest Script

Quest Property TMMapQuest Auto
ObjectReference Property TeleportMarkerCommonwealth Auto
ObjectReference Property TeleportMarkerSwamp Auto
Actor Property PlayerRef Auto
Message Property TMMapMenu Auto

Event OnQuestInit()
TeleportMarkerCommonwealth.moveto(PlayerRef)
 Int iButton = TMMapMenu.Show()
    If IButton == 0
PlayerRef.moveto(TeleportMarkerSwamp)
TMMapQuest.completequest()
TMMapQuest.stop()
TMMapQuest.reset()
Elseif IButton == 1
PlayerRef.moveto(TeleportMarkerCommonwealth)
TMMapQuest.completequest()
TMMapQuest.stop()
TMMapQuest.reset()

Endif
EndEvent

Issue: The Menu still shows up while reading the book

Link to comment
Share on other sites

For reference: The (Clunky) Solution

 

Create a persistent and "Intially Disabled" Triggerzone with the travel menu in it

 

Book Script:

ObjectReference Property TMMapTrigger Auto
Actor Property PlayerRef Auto

Event OnRead()
TMMapTrigger.enable()
TMMapTrigger.moveto(PlayerRef)
EndEvent

 

Trigger Script:

Scriptname TMBookTriggerScr extends ObjectReference

ObjectReference Property TeleportMarkerCommonwealth Auto
ObjectReference Property TeleportMarkerSwamp Auto
Actor Property PlayerRef Auto
Message Property TMMapMenu Auto

Event OnTriggerEnter(ObjectReference akActionRef)
	if akActionRef == Game.GetPlayer()
TeleportMarkerCommonwealth.moveto(PlayerRef)
 Int iButton = TMMapMenu.Show()
    If IButton == 0
;PlayerRef.moveto(TeleportMarkerSwamp)
Game.FastTravel(TeleportMarkerSwamp)

Self.disable()
Elseif IButton == 1
;PlayerRef.moveto(TeleportMarkerCommonwealth)
Game.FastTravel(TeleportMarkerCommonwealth)
Self.disable()

Elseif IButton == 2
Self.disable()

Endif

Endif
EndEvent

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...