Jump to content

Dialogue Loop


Recommended Posts

In a saloon in my scenario, I want to get an NPC drunk. Here's the dialogue snippet that I'd like to have checked:

 

Code:
 begintalknode 61;	state = 58;	personality = 8;	nextstate = 58;	condition = (get_flag(1,6) < 5) && (coins_amount() >= 10);	question = "Buy him a drink.";	text1 = "Drink buying text.";	code = change_coins(-10);		inc_flag(1,6,1);		break;begintalknode 62;	state = 58;	personality = 8;	nextstate = -1;	condition = get_flag(1,6) == 5;	question = "Tell us about the bandits.";	text1 = "Talks about bandits.";	action = END_TALK; 
I'm essentially using the node conditions to create a loop, instead of putting the loop in the code. Thanks in advance for telling me if this will work or not, and if not... is there a better way to do it?
Link to comment
Share on other sites

I would have the action DEP_ON_SDF 1 6 5, instead of a condition.

 

This way you can ask him about bandits every time, but he'll only tell you the right stuff after five drinks.

 

Since the player may not know about this, is there someone before that tells you he's a talkative drunk?

Link to comment
Share on other sites

Additionally, you can only get the same node once per set of conversation options, which means that if he has other dialogue options, you would have to exhaust them every single time you wanted to buy him another drink, or you would have to end the conversation and start it again.

 

In that case, it may be less annoying just to make different nodes.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...