You want to set a variable to guide the quest forward and so you know what stage of the quest it is at.
It's personal choice on how you want to name the variable. For myself, I might call the variable lost_q and when it's given by the first NPC, set the value of the variable to 5. The next time the quest is updated, change the variable to 10, 15, 20, etc. The numeric value of the journal would match the variable.
Example -
NPC#1 - gives out the quest.
NPC#2 - can ask about the quest.
NPC#3 - can ask about the shed.'
SHED - where to find the treasure.
NPC1 - When you first hand out the quest, set the variable and the journal entry.
SetLocalInt(GetModule(), "lost_q", 5);
You now know the quest has been given to the player and set the variable lost_q to equal 5.
NPC#2 would then have a TEXT APPEARS conditional script on the "Do you know where I can find the lost treasure of awesomeness?" that checks the value of the variable.
int StartingConditional()
{
// Inspect local variables
if(!(GetLocalInt(GetModule(), "lost_q") == 5))
return FALSE;
return TRUE;
}
If it equals five, display the line, if not, the line is not displayed as an option for the player.
Now somewhere during that conversation option, NPC#2 tells the player where they last heard the treasure of awesomeness was. This is where you'd use the ACTIONS TAKEN TAB and write another script to update the lost_q variable and also use the OTHER ACTIONS TAB to select the appropriate journal entry.
SetLocalInt(GetModule(), "lost_q", 10);
Changing the variable to 10 serves two purposes. First, it updates the quest variable and tells the game what stage the quest is at. Now that it equals 10, the player will no longer receive the "Do you know where I can find the lost treasure of awesomeness?" option. Since they already asked this question and the variable was updated from 5 to 10, it won't be displayed.
Second, it sets up the quest for the next stage of finding the treasure.
This is how I normally put quests together. With each variable update, 5, 10, 15, 20, etc., there is also a journal entry number associated with the variable number. This way, when I'm reading journal entry #25 for this particular quest, I know that quest entry is only handed out when the variable equals 25.
Setting variables is the key.
FP!
Modifié par Fester Pot, 20 septembre 2010 - 12:36 .