Difference between revisions of "A beginner's guide, lesson 7 - Using Scripts in Quests"

Jump to navigation Jump to search
→‎At the Cottage: adding sections
imported>Pyrocow2
(→‎The Final Chamber: adding sections)
imported>Pyrocow2
(→‎At the Cottage: adding sections)
Line 30: Line 30:
We have seen how to use a limited amount of scripting to progress our quest. While there is loads more dialogue to include in this part of the quest, we will focus far more on the use of scripting.  
We have seen how to use a limited amount of scripting to progress our quest. While there is loads more dialogue to include in this part of the quest, we will focus far more on the use of scripting.  


==At the Cottage==
==Cottage Phase==
 
===Entering the cottage===
We cannot rely on dialogue to progress our quest because the courier is dead.
We cannot rely on dialogue to progress our quest because the courier is dead.


Line 53: Line 53:
  ''I found the courier's cottage. I should look around for some clues.''
  ''I found the courier's cottage. I should look around for some clues.''


===Finding the clues===
Now we need to write a bit of script to handle the two clues we left in the cottage. There's more than one way to do this, but for now we will add a script to each of the clue items, and a couple of new variables to the main quest script.
Now we need to write a bit of script to handle the two clues we left in the cottage. There's more than one way to do this, but for now we will add a script to each of the clue items, and a couple of new variables to the main quest script.


Line 101: Line 102:
  ''I found some clues for Captain Hubart to work with. I should return to him in Chorrol.''
  ''I found some clues for Captain Hubart to work with. I should return to him in Chorrol.''


===Returning the clues===
Now we can now set up the next bit of interaction with Hubart.  
Now we can now set up the next bit of interaction with Hubart.  


We use the topic BGCluesFound that was added earlier. We want one response if the player has not collected the clues yet, and another for when they have collected the clue. We can use the quest stage as a condition. Set up the responses so that a new topic called BGRedRose is added if we have the clues.
We use the topic ''BGCluesFound'' that was added earlier. We want one response if the player has not collected the clues yet, and another for when they have collected the clue. We can use the quest stage as a condition. Set up the responses so that a new topic called ''BGRedRose'' is added if we have the clues.


{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
Line 167: Line 169:
This is the first time we've checked the ''OR'' flag on a condition. If any of the ''OR'' conditions are true, we basically get a TRUE for that entire set of ''OR'' conditions. So if the player has either the amulet or the paper, the stage is 40, and the actor is Cpt. Hubart, this response will show up. The ''OR'' statements by themselves would also work if we had BOTH of the objects (both would be true), but because we already would have changed the stage to 50 in that case, the stage condition here fails and eliminates the response. (50 != 40)
This is the first time we've checked the ''OR'' flag on a condition. If any of the ''OR'' conditions are true, we basically get a TRUE for that entire set of ''OR'' conditions. So if the player has either the amulet or the paper, the stage is 40, and the actor is Cpt. Hubart, this response will show up. The ''OR'' statements by themselves would also work if we had BOTH of the objects (both would be true), but because we already would have changed the stage to 50 in that case, the stage condition here fails and eliminates the response. (50 != 40)


For the Red Rose topic add this response and add a new topic called BGSmith.
===Leading the player to the next phase===
For the Red Rose topic add this response and add a new topic called ''BGSmith''.


{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
Line 184: Line 187:
!  CONDITIONS
!  CONDITIONS
|   
|   
* GetIsId BGCptHubart == 1
* GetIsId 'BGCptHubart' == 1
* GetStage BGM001 == 50
* GetStage 'BGM001' == 50
|-
|-
!  ADD TOPICS
!  ADD TOPICS
Line 210: Line 213:
!  CONDITIONS
!  CONDITIONS
|   
|   
* GetIsId BGCptHubart == 1
* GetIsId 'BGCptHubart' == 1
* GetStage BGM001 == 50
* GetStage 'BGM001' == 50
|-
|-
!  ADD TOPICS
!  ADD TOPICS
Anonymous user

Navigation menu