Jump to content

Need starting secondary quest script help


Jerros

Recommended Posts

Hi all. I am still very new to scripting and was wanting to know the script or condition for starting a quest only after a previous related quest has been completed. What I have planned exactly is to have a prologue quest be completed first then the main quest would start shortly after once the new npc was met. But I was wondering how to set a script or condition to only allow the main quest to be started if the prologue has been completed.

I have both quest pretty much working but I don't want it so that folks can bypass the prologue and start the main quest on happenstance. Any help with this would be greatly appreciated.

Edited by Jerros
Link to comment
Share on other sites

  • 2 weeks later...
You could do a few things here. One simple solution is to have nothing on stage one of the main quest and at the end of the prologue, have the last quest update run the script for updating the main quest to the first notable stage. You could also just put scripts in the beginning of your main quest that just check to see if the prologue has been finished before they run. I'm assuming you don't have any other scripts, but you must know how to update the quest stages right? If you're looking for some more particular information I'll need a little more info on your situation.
Link to comment
Share on other sites

Just make sure your main quest doesnt have the 'Start game enabled' flag set and in your prologue quest do a simple mainquest.start() or mainquest.setStage(x) when its finished. If you not initializing your mainquest from anywhere else then the prologue must be completed first.

 

edit:

And if you have scripts on other items that require your MQ be completed to run you could have a simple check at the start of each.

 

scriptname someScript extends somthing

quest property mainquest auto

Event OnInit() 
if (MainQuest.IsRunning == true)
AllowScriptToRun()
endif

Endevent

function AllowScriptToRun()
;do your magic here
endfunction

Link to comment
Share on other sites

  • Recently Browsing   0 members

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