Game Breaking Conversation Menus

cybernetsurfer7
Hello fellow text adventurers! I've been working on my game for a while now, occasionally posting questions here on the forums, and I'm now happy to say that my game Demo is essentially finished! However, this is not a game announcement (I'll be putting that in the appropriate forum). There is one final issue that I need to ask the experts here to help me with.

I am using a conversation menu approach to some parts of my game. This is achieved by storing dialogue options in a String Dictionary. This dictionary is then displayed using Show Menu. After the player picks an option, the menu disappears and the appropriate response is selected from a Switch. However, there seems to be an issue with this approach when played online.

When a player chooses an option, it takes up to a few seconds to load the new response. In that time, if the player clicks again or on a different option, it produces and error. First it will say: "You've already talked about that." (My Default on the Switch) and then if clicked again this error appears: "Error running script: Unexpected menu response." The only way that I've been able to overcome this is by informing my players to wait a few seconds after clicking to prevent this, but that seems a seriously cumbersome way to handle it.

If you would like to see the error in action, play my game found here: http://play.textadventures.co.uk/Play.a ... y2bxeakxdg
To get to a conversation, click PLAY, go to the Living Room, and open the Door. Then you'll be in a conversation with the character Danyel. Try to click more than once on an option in quick succession to produce the error. The error can be potentially overcome by clicking on the Look button at the top.

Thank you so much for your help in advance!

The following is the code for this particular conversation.

The Room code:
  if (IntroDanyel.convoEvent = 0) {
msg ("<b>Byron:</b> \"Let's see what this is all about.\" <br/><br/>Byron reaches for the door and turns the handle. <br/><br/>The instant the latch is lifted, a controlled force throws the door open. Byron barely dodges a flurry of raven hair as the assailant whips through the opening. The unidentified figure swiftly replaces the door to its closed position and turns to face Byron. Byron, having barely prevented himself from falling backwards over the reading chair, steadies himself to get a clear look at the intruder.<br/><br/>Through the girl’s messy, teased strands of hair, Byron, still slightly in shock, recognizes her.<br/><br/><b>Byron:</b> \"Danyel?\"<br/><br/>She nods as she holds a finger to her mouth. They stand there a few moments in near silence. Then, apparently satisfied she had avoided whatever danger pursued her, she pulls herself from the door and gestures towards the couch.<br/><br/><b>Danyel:</b> \"May I sit?\"<br/><br/>Byron, still recovering from his early and eventful awakening, nods.<br/><br/>Danyel drops into a corner of the couch and pulls her knees up to her chest. She looks up over them at Byron who is fumbling to find the edge of the chair, his eyes focused on her. He shifts uneasily into the seat.<br/><br/><b>Danyel:</b> “Sorry for barging in on you like this. I needed help.”<br/>")
IntroDanyel.convoEvent = 1
IntroLivingRoom.Knocking = false
game.hint = 1
list add (KitchenCupboards.displayverbs, "Search")
}
else {
msg ("Danyel looks up at Byron inquisitively.<br/>")
}
TalkDanyel1


The Function TalkDanyel1 Code:
IntroDanyel.talkTopics = SortDictionary(IntroDanyel.talkTopics)
ShowMenu ("", IntroDanyel.talkTopics, false) {
if (DictionaryContains (IntroDanyel.talkTopics, result)) {
switch (result) {
case (1) {
msg ("<b>Byron:</b> “Danyel, what are you doing here? Why were you knocking on my door?”<br/><br/><b>Danyel:</b> “I was in trouble. I had some… people after me. I needed some place to hide, and I thought you’d help.” <br/><br/><b>Byron:</b> “You couldn’t report it to the Elites?”<br/><br/>Danyel’s eyes darken.<br/><br/><b>Danyel:</b> “It’s not a situation I want them involved in. Will you help, or should I just leave now?”<br/>")
dictionary remove (IntroDanyel.talkTopics, "1")
dictionary remove (IntroDanyel.talkTopics, "4")
dictionary add (IntroDanyel.talkTopics, "5", "What kind of help do you need?")
}
case (2) {
msg ("<b>Byron:</b> “Danyel, I haven’t seen you in five years.”<br/><br/>She smiles slightly. <br/><br/><b>Danyel:</b> “Yeah, it’s been a long time since the Com-Pod.” Her smile fades, “And since you went incognito.” <br/>")
dictionary remove (IntroDanyel.talkTopics, "2")
dictionary add (IntroDanyel.talkTopics, "3", "“Incognito”?")
}
case (3) {
msg ("<b>Byron:</b> “What do you mean ‘incognito’? I just felt it was time to move on. Get my own place. You know I didn’t enjoy living in such a small place with so many other people.”<br/><br/><b>Danyel:</b> “Same excuse you gave back then. Well, after you went off to ‘get your own place,’ they assigned us a new roommate. And thus we got Blaine. Stupid, immature Blaine. You have no idea how awful that was. But that’s not important right now.” <br/>")
dictionary remove (IntroDanyel.talkTopics, "3")
}
case (4) {
msg ("<b>Byron:</b> “Help with what?”<br/><br/>Danyel looks at him gravely. <br/><br/><b>Danyel:</b> “Byron, I know it’s been a long time since we’ve seen each other. We haven’t had any contact since the Com-Pod days. I... I got in with the wrong people. I had to get out, and I when I found that you lived here I thought that maybe you’d help me.”<br/><br/><b>Byron:</b> “Can’t you report it to the Elites?”<br/><br/>Danyel’s eyes darken.<br/><br/><b>Danyel:</b> “It’s not a situation I want them involved in. I can’t leave through the main entrance. Is there any other way out of this place?” <br/>")
dictionary remove (IntroDanyel.talkTopics, "1")
dictionary remove (IntroDanyel.talkTopics, "4")
dictionary add (IntroDanyel.talkTopics, "6", "I need to know more first")
dictionary add (IntroDanyel.talkTopics, "7", "I’ll see what I can do")
}
case (5) {
msg ("<b>Byron:</b> “How can I help?”<br/><br/><b>Danyel:</b> “Like I said, there are some people after me. Bad people. I need a way out of here that’s not the front door. I’m sure they’re watching that way.” <br/>")
dictionary remove (IntroDanyel.talkTopics, "5")
dictionary add (IntroDanyel.talkTopics, "6", "I need to know more first")
dictionary add (IntroDanyel.talkTopics, "7", "I’ll see what I can do")
}
case (6) {
msg ("<b>Byron:</b> “Danyel, I think I need to know more before I help you. This doesn’t sound like something I’m terribly keen on getting into.”<br/><br/>Her eyebrows angle sharply inwards. <br/><br/><b>Danyel:</b> “I’ve already told you everything. Help me or don’t.”<br/>")
dictionary remove (IntroDanyel.talkTopics, "6")
}
case (7) {
msg ("<b>Byron:</b> “Alright. I’ll help. There might be a way. Let me think for a minute.”<br/><br/><b>Danyel:</b> “Okay, but please hurry. I don’t think either of us is safe as long as I’m here.”<br/>")
dictionary remove (IntroDanyel.talkTopics, "7")
dictionary add (IntroDanyel.talkTopics, "990", "Return to Living Room")
if (DictionaryContains (IntroDanyel.talkTopics, "6")) {
dictionary remove (IntroDanyel.talkTopics, "6")
}
}
case (8) {
msg ("Byron, escape rope in hand, approaches Danyel. She looks up at him and traces the rope from his hands to the light fixture.<br/><br/><b>Danyel:</b> “That’s your plan?”<br/><br/><b>Byron:</b> “Well, unless you’ve got a better one, this will have to do. You’re the one who came barging in here during my sleep rotation running from unknown assailants. This is what I’ve got.”<br/><br/>She ponders for a moment. <br/><br/><b>Danyel:</b> “Will it hold me?”<br/><br/><b>Byron:</b> “It’s solid synth-rope. Should hold far more than your weight. And I can guarantee that light fixture won’t budge.”<br/><br/><b>Danyel:</b> “You just happen to have snyth-rope lying around your apartment?”<br/><br/><b>Byron:</b> “I got it from one of my co-workers. He’s always spending his paycheck on crazy stuff and then gifting them for birthdays and such. It came with this card: ‘Never know when you’ll need it.’ This wasn’t exactly the situation I expected, though.”<br/><br/><b>Danyel:</b> “What about my hands? Snyth-rope isn’t usually very kind to raw flesh.”<br/><br/><b>Byron:</b> “I’ve got some towels here. Wrap your hands in them.”<br/><br/>Danyel wraps her hands tightly.<br/><br/><b>Byron:</b> “That’s about the best I can do. Are you ready to try this, Danyel?”<br/><br/>She looks at the rope for a moment before answering. <br/><br/><b>Danyel:</b> “It’s not the craziest thing I’ve ever done. Let’s do it.”<br/><br/>Byron tosses the whole length out the window. “I’ll hold on up here.” <br/><br/>Danyel climbs over the window sill and swings out her legs. She half turns back towards him.<br/><br/><b>Danyel:</b> “Bryon, thanks.”<br/><br/><b>Byron:</b> “You’re welcome, though I wish I knew more about what was going on.”<br/><br/>She regards Byron intensely. <br/><br/><b>Danyel:</b> “Tell you what: come by Sandy’s Hideaways in the Warf District during first rotation. We might be able to talk more.” <br/><br/>She turns to climb, takes a deep breath. and starts to lower herself down. Byron pulls on the rope as he feels it take her weight. A second later, her explosion of wild, jet hair pops back up over the window sill. <br/><br/><b>Danyel:</b> “And don’t you breathe a word of this to anyone!” <br/><br/>Her head vanishes in a poof of locks.<br/><br/>A couple of long moments later, the weight from the rope lifts. Byron fumbles to the floor for the second time this rotation. Recovering, he runs to the window and leans out. Far below he sees a small figure waving a hand wildly at him before running off into the quiet streets. Exhausted from these strange events, Byron gathers up the snyth-rope. He closes the window, draws over the window screen, and heads to his bedroom, motioning for the lights to turn off as he does so. As he crawls into bed, he glances at his Citizen’s ID. The display reads 2:5:43.<br/><br/><b>Byron:</b> “Only about two hours left before third rotation. I wonder what that was all about. I hope she’ll be okay.”<br/><br/>Byron drifts off to an unsteady sleep. His alarm wakes him two hours later.<br/>")
IntroDanyel.convoEvent = 2
IntroDanyel.talkTopics = NewStringDictionary()
dictionary add (IntroDanyel.talkTopics, "9", "Head to Work")
MoveObject (IntroTowels, ItemHolder)
}
case (9) {
IntroDanyel.leaving = true
}
case (990) {
IntroDanyel.leaving = true
}
default {
msg ("That isn't a valid option")
}
}
// JS.scrollToBottom ()
JS.RemoveLinks ()
if (IntroDanyel.leaving = false) {
TalkDanyel1
}
else if (IntroDanyel.leaving = true) {
// Move Player to next room
// If convoEvent =
// 0 = (Before First Convo)
// 1 = IntroLivingRoom
// 2 = WorkOutsideApartment
IntroDanyel.leaving = false
if (IntroDanyel.convoEvent = 1) {
MoveObject (player, IntroLivingRoom)
}
else if (IntroDanyel.convoEvent = 2) {
MoveObject (player, WorkOusideApartment)
}
}
else {
}
}
else {
msg ("You've already talked about that.")
}
}

jaynabonne
It definitely seems to be a problem. Have you reported it as an issue?

(BTW, nice looking game. And an interesting interface design!)

cybernetsurfer7
Thanks! I've submitted an issue report. We'll see what comes of it.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums