Can someone explain dialogue script fragments?

Post » Fri Aug 05, 2016 11:21 pm

I'm trying to get: cqf *separate quest* resetactor akSpeaker to execute at the end of a dialogue. Back in the good old days it was nice and simple you just had a box for a result script in each line of dialogue.



But now this whole thing with script fragments is confusing me.



What's the first step I have to do? Make a new script? Define some [censored] and then put that command in? If I put that command in do I even need to use a fragment? Or is the the main script just for defining and the commands go in the fragments?



OH MYYY GOOOOOOOOOOOOOD

User avatar
Avril Louise
 
Posts: 3408
Joined: Thu Jun 15, 2006 10:37 pm

Post » Sat Aug 06, 2016 4:06 am

I have no idea what "cqf *separate quest* resetactor akSpeaker" is suppose to be. That's not Papyrus code.



To get fragments working you just put your code in the fragment box and compile. The only complication is if you need to access some external property. In that case the easy way to do things is to put a single ; in the fragment box and compile it. That will generate the fragment and fragment script. Then close the topic info window, reopen it, add any required properties to the script, and then you should be able to go back to the fragment box and add the real code.

User avatar
Eibe Novy
 
Posts: 3510
Joined: Fri Apr 27, 2007 1:32 am

Post » Sat Aug 06, 2016 11:39 am

Thanks I'll see if I can get that to work stumbling along!


http://www.creationkit.com/fallout4/index.php?title=CallQuestFunction


I guess the other quest I want to call a function from is an external property?

User avatar
Charlie Sarson
 
Posts: 3445
Joined: Thu May 17, 2007 12:38 pm

Post » Fri Aug 05, 2016 10:27 pm

That would seem to be a Fallout 4 related function. Did you mean to post this in the Skyrim Creation Kit area? If you mean to use that for Skyrim, it's not going to work on the 2011 version of the game. It will probably work on the Special Edition though.

User avatar
marie breen
 
Posts: 3388
Joined: Thu Aug 03, 2006 4:50 am

Post » Sat Aug 06, 2016 12:19 am

It's also not a Papyrus function.



Yes, to call a function that's in a script on another quest you create a property for the quest with a type equal to the quest script. Here's an example of the syntax I usually use.



MQ201PartyScript Property MQ201Party Auto

Function Example_of_calling_a_quest_function()
MQ201Party.TryToStartErikurIntroScene()
EndFunction

Here's the style Bethesda seems to prefer.



Quest Property MQ201Party Auto

Function Example_of_calling_a_quest_function()
(MQ201Party as MQ201PartyScript).TryToStartErikurIntroScene()
EndFunction

A quest can have more than one script attached so you need to specify which script in addition to picking the quest.

User avatar
Raymond J. Ramirez
 
Posts: 3390
Joined: Sun Oct 14, 2007 8:28 am


Return to V - Skyrim