Jump to content

Help with creating a more complex quest and scripts


bigman28

Recommended Posts

Well let me just tell you it straight... the G.E.C.K information page is a joke. I need a little more help to create a little more complex quest. not only that but it gives you almost no info on scripts!
Link to comment
Share on other sites

  • Replies 82
  • Created
  • Last Reply

Top Posters In This Topic

An example,

 

scn SMtestqueststage10triggerSCRIPT

 

begin onTriggerEnter player

 

if getstage SMtestquest < 10

setstage SMtestquest 10

endif

 

end

 

to create a trigger to start a quest... one objective is to find a security checkpoint, Once found however once I find it in game it doesn't register as completed objective. how do I create a script and trigger for that?

Edited by bigman28
Link to comment
Share on other sites

An example,

 

scn SMtestqueststage10triggerSCRIPT

 

begin onTriggerEnter player

 

if getstage SMtestquest < 10

setstage SMtestquest 10

endif

 

end

 

to create a trigger to start a quest... one objective is to find a security checkpoint, Once found however once I find it in game it doesn't register as completed objective. how do I create a script and trigger for that?

 

If you open the quest dialog you will find "Quest Stages" and "Quest Objectives". Quest stages are there so that it's easier to manage the flow of quests, Quest objectives are there to display the objectives.

Open the Objectives tab and add some objectives, note the number next to each objective. Then you can use these functions to display them and do other stuff:

 

SetObjectiveDisplayed

GetObjectiveDisplayed

SetObjectiveCompleted

GetObjectiveCompleted

CompleteAllObjectives

Edited by Glenstorm
Link to comment
Share on other sites

Personally I use the stages to generally dictate the objectives being (old objectives get) completed and (and new ones get) displayed...

 

It's just knowing how you want the flow of the quest to be.

Link to comment
Share on other sites

An example,

 

scn SMtestqueststage10triggerSCRIPT

 

begin onTriggerEnter player

 

if getstage SMtestquest < 10

setstage SMtestquest 10

endif

 

end

 

to create a trigger to start a quest... one objective is to find a security checkpoint, Once found however once I find it in game it doesn't register as completed objective. how do I create a script and trigger for that?

 

If you open the quest dialog you will find "Quest Stages" and "Quest Objectives". Quest stages are there so that it's easier to manage the flow of quests, Quest objectives are there to display the objectives.

Open the Objectives tab and add some objectives, note the number next to each objective. Then you can use these functions to display them and do other stuff:

 

SetObjectiveDisplayed

GetObjectiveDisplayed

SetObjectiveCompleted

GetObjectiveCompleted

CompleteAllObjectives

I have some objectives already

 

10

15 - find the security checkpoint

20

100

 

once I found the checkpoint it should be objective completed.

where do I use those functions on this one.

Link to comment
Share on other sites

Here is an example of an easy way to do it...

 

You start the quest by using this code: SetStage MyQuest1GetBeer 10

 

The quest ID: MyQuest1GetBeer

The quest name: Grab a beer off the table

 

[stages]

10 (You have accepted the mission through either dialogue, or a script-based object of some kind)

---result box code--- SetObjectiveDisplayed MyQuest1GetBeer 10

20 (You have arrived at the bar, update objective)

---result box code--- SetObjectiveCompleted MyQuest1GetBeer 10

---result box code--- SetObjectiveDisplayed MyQuest1GetBeer 20

30 (The beer has been found, update objective)

---result box code--- SetObjectiveCompleted MyQuest1GetBeer 20

---result box code--- SetObjectiveDisplayed MyQuest1GetBeer 30

35 (this is a tranisition stage.. I've noticed I cannot complete mission objectives by putting the code in the quest stage that has "Complete Quest" checked off)

---result box code--- SetObjectiveCompleted MyQuest1GetBeer 35

40

---Do this--- check off the "Complete Quest" check box...

 

[Objectives]

10

-Go to building with beer

20

-Find the beer

30

-Drink the beer

 

 

 

So yeah, you use triggers (scripts), and dialogue/terminals (result scripts) to use SetStage function to advance the quest along appropriately. Hope that helped.

Link to comment
Share on other sites

Here is an example of an easy way to do it...

 

You start the quest by using this code: SetStage MyQuest1GetBeer 10

 

The quest ID: MyQuest1GetBeer

The quest name: Grab a beer off the table

 

[stages]

10 (You have accepted the mission through either dialogue, or a script-based object of some kind)

---result box code--- SetObjectiveDisplayed MyQuest1GetBeer 10

20 (You have arrived at the bar, update objective)

---result box code--- SetObjectiveCompleted MyQuest1GetBeer 10

---result box code--- SetObjectiveDisplayed MyQuest1GetBeer 20

30 (The beer has been found, update objective)

---result box code--- SetObjectiveCompleted MyQuest1GetBeer 20

---result box code--- SetObjectiveDisplayed MyQuest1GetBeer 30

35 (this is a tranisition stage.. I've noticed I cannot complete mission objectives by putting the code in the quest stage that has "Complete Quest" checked off)

---result box code--- SetObjectiveCompleted MyQuest1GetBeer 35

40

---Do this--- check off the "Complete Quest" check box...

 

[Objectives]

10

-Go to building with beer

20

-Find the beer

30

-Drink the beer

 

 

 

So yeah, you use triggers (scripts), and dialogue/terminals (result scripts) to use SetStage function to advance the quest along appropriately. Hope that helped.

How do you create a script to accept a mission through dialogue?

Link to comment
Share on other sites

well, you can add dialogue to a generic existing quest. And make your character the only one to speak those lines, and then he can offer the quest that way.

Please elaborate what you mean

 

do I use the conversation editor? cause that's what I've been using.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...