Menu Options Missing

EDIT: I've actually solved the below issue by using custom events to handle all the different dialogue options rather than have it all in one huge screed. I thought I'd leave the post up in case it's useful for anyone else to see it but if any mods would prefer it be deleted don't hesitate to let me know

Thanks!

Hi all,

I'm making a text-based game where the story is told in branching narratives using menus for dialogue options.

The best way I've worked out for having the dialogue branch out is to "nest" the dialogue trees inside the menu options. A small example is below:

on interact do
stop
sound "crackle"
say "Hello? Does anyone copy?"
wait 0.1 then
menu at 6,10,10,3 then

		option "Copy" then
		  say "Copy."
			wait 0.1 then
				say "Good, you're still there. We lost you for a few moments!"
				wait 0.1 then
					menu at 0,10,24,3 then
						
						option "Repairs" then
							say "I had to make some quick repairs"
						end
					end
				end
			end
		option "I'm here!" then
		  say "I'm here"
		  wait 0.1 then
		    say "Phew! We didn't think anyone survived!"
		  end
	end
		end
	end
end

The problem I've come across is that when the code is expressed like this, the second menu option ("I'm here!") doesn't appear in the menu. It works fine if I just have the two menu options with nothing in between, but if I include:

say "Copy."
wait 0.1 then
say "Good, you're still there. We lost you for a few moments!"
wait 0.1 then
menu at 0,10,24,3 then

						option "Repairs" then
							say "I had to make some quick repairs"
						end
					end
				end

Then when I run it only the first option ("Copy") appears in the menu. Is there a fix here or am I going about this completely wrong? I did think about using Ask instead of Menu but the character limit on ask is going to become a problem further down the line.

Thanks for any advice!

I don't know if I'm reading the code right, but it looks like the "I'm here!" option is actually inside the "Copy" option. It might just need to be moved down one?

1 Like

I think that may have been the issue, but it's actually good I made that mistake as I've ended up with a much better system for making this work! Thanks for taking a look :slight_smile:

1 Like