Jump to content

[SOLVED] Creationkit: Howto trigger a script by a dialogue line?


worik

Recommended Posts

Posted

I'm (hopefully) learning how I would trigger a script by a certain dialogue.

 

Right now, the dialogue talks to me, but it doesn't fire the script. Not even the debug message is displayed, so I conclude it doesn't even start at all

I am sure I am missing something ?

The dialogue:

Spoiler

CK1.jpg.ae0c28ce59c8d11a1ee0c0cb0208161b.jpg

 

And my little script

Spoiler

Scriptname WMAE_TeleportScript extends TopicInfo  

ObjectReference Property Location1 Auto  

Event OnBegin(objectreference akspeakerref, bool abhasbeensaid)
	debug.messagebox("Triggered")
	game.EnableFastTravel()
	game.FastTravel(Location1)
EndEvent

Event OnEnd(objectreference akspeakerref, bool abhasbeensaid)
	debug.messagebox("Teleported")
EndEvent

 

 

Any ideas what I am missing? :classic_huh:

Posted

? Those would be just local fragments.

I want to reuse this script many times, but that won't work with fragments?

 

Posted

Note to myself for later ?

  • add the script to the quest
  • create a teleport(destination) function
  • call that function from the topic
  • test if that works

 

Edit: SOLVED!

:classic_laugh:

Short solution for everybody:

  • create a quest for all the dialogues
  • add my utility script with my little teleport function to the quest
  • in my dialogue
    • end fragment window:
      • call my function => this call will be a script in itself
    • in the right script window:
      • add a property to access the destination variable of the function
      • set property to the destination

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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