Jump to content

Trying to get the player to teleport after dialog


PBalfredo

Recommended Posts

I'm trying to get it set up so I talk to an NPC and at the end of the dialog me he takes me (teleports me) to the quest area.

 

Following other tutorials I've been able to make activators that are able to teleport the player around with this script:

 

Scriptname tele01 extends ObjectReference  

ObjectReference Property TeleportMarker auto
Event OnActivate(ObjectReference akActionRef)
Game.GetPlayer().MoveTo(TeleportMarker)
EndEvent

 

Then I tried to adapt the code to add into the Papyrus fragment at the end of the dialog with the NPC:

 

GetOwningQuest().SetObjectiveDisplayed(30)
GetOwningQuest().setstage(30)
ObjectReference Property TeleportMarker auto
Game.GetPlayer().MoveTo(TeleportMarker)

 

But when I try to compile that I get "no viable alternative at input" errors:

 

Starting 1 compile threads for 1 files...
Compiling "TIF__02005BD4"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02005BD4.psc(11,0): no viable alternative at input 'ObjectReference'
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02005BD4.psc(11,25): no viable alternative at input 'TeleportMarker'
No output generated for TIF__02005BD4, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on TIF__02005BD4

 

Why is my script at the end of dialog failing when it works in an activator? The only difference I see is that it's not wrapped in an event like the activator script, but isn't the end-of-dialog papyrus fragment sort of an event itself? I mean, my script for advancing the stage of the quest works and it's not wrapped in a specifically scripted event. I'm sure I'm missing something fundamental, but I'm at a loss. Help please?

Link to comment
Share on other sites

  • 2 weeks later...

Nevermind! Found the solution. It was solved by some advice from this topic:

 

http://forums.nexusmods.com/index.php?/topic/776172-setting-game-time-to-a-specific-time/

 

Basically I had to go into the Edit Properties menu for my script, click on my ObjectReference variable for where I want the player to end up, then link to that point by Find in Render Window. Also, appearently because I was in Papyrus fragments, I need to do just that and only that. It didn't like me trying to define the variable within the fragments with "ObjectReference Property TeleportMarker auto". So in the end I just had:

 

GetOwningQuest().SetObjectiveDisplayed(30)
GetOwningQuest().setstage(30)
Game.GetPlayer().MoveTo(TeleportMarker)

 

With TeleportMarker found in the Edit Properties menu.

Link to comment
Share on other sites

  • 4 years later...

I understand that this topic is... 5 years old (damn das a long ass time) but I wanted to take my chances, I'm a noob alright I am, but I'm trying to get a terminal to Teleport you to a location. I'm just wondering how i'd go about that with a Terminal and not a Talking Activator or real character Dialogue

Link to comment
Share on other sites

What do you actually want the player or character to do, touch like a switch or a locational trigger where the play walks into a certain area and suddenly he/she are somewhere else. What do you mean by Terminal? i've used both the trigger and a Activator but not a NPC but I'm sure I maybe able to work that out sooner or later. More info. DF127 Does a good Teleportation tut have a look at this Link:

https://www.youtube.com/watch?v=sUvAdAbvVAk
Link to comment
Share on other sites

  • Recently Browsing   0 members

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