dialog help

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: dialog help
Warrior
Member # 4778
Profile Homepage #0
now that the sdf works with the door, i got a new problem:
when the party approaches the door a dialog should come up depending on the sdf. this works ok, but the second dialog: "The door is open now." should only appear once! Now it appears every time when the party approaches the door.

this is the piece of my script:

beginstate 10;
reset_dialog();
if (get_flag(0,2) == 0) {
add_dialog_str(0,"This door is heavily locked. You see no way to open it!",0);
choice = run_dialog(1);
}
else {
add_dialog_str(0,"The door is open now.",0);
choice = run_dialog(1);
}
break;

btw: can someone explain the difference between this add_dialog_str thing and the call message_dialog to me?

--------------------
www.bigblue.de.gg BoA graphics and more
Posts: 188 | Registered: Monday, July 26 2004 07:00
Triad Mage
Member # 7
Profile Homepage #1
beginstate 10;
reset_dialog();
if (get_flag(0,2) == 0) {
add_dialog_str(0,"This door is heavily locked. You see no way to open it!",0);
choice = run_dialog(1);
}
else if (get_flag(0,2) == 1) {
add_dialog_str(0,"The door is open now.",0);
choice = run_dialog(1);
set_sdf(0,2,2);
}
break;

--------------------
"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
Warrior
Member # 4778
Profile Homepage #2
nah, logical, i always forget the possibility of setting a flag to a higher value than one!
thx a lot, it was nearly enough to drive me to despair!

edit: as logical as it sounded, it didn't work that way. i finally put another encounter behind my door refering to a new state which sets the flag to 2.

[ Saturday, September 04, 2004 11:12: Message edited by: bigblue ]

--------------------
www.bigblue.de.gg BoA graphics and more
Posts: 188 | Registered: Monday, July 26 2004 07:00