Dialogue Loop

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: Dialogue Loop
Member # 1250
Profile #0
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:

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);

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?
Posts: 93 | Registered: Saturday, June 1 2002 07:00
Triad Mage
Member # 7
Profile Homepage #1
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?

"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Member # 869
Profile Homepage #2
Yeah. Personally, I'd recommend giving him different messages after every drink so the player knows they're making progress.

The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Off With Their Heads
Member # 4045
Profile Homepage #3
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.

Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00