Making a more-than-two answers possible question

Started by Renkineko, September 06, 2013, 09:05:08 AM

Previous topic - Next topic
September 06, 2013, 09:05:08 AM Last Edit: September 06, 2013, 09:15:15 AM by Renkineko
Hi,

This morning I was thinking : In the case of a multiple answers question, like a
"Choose how many
bombs you would
like to buy
> 1 bomb
> 3 bombs
> 10 bombs"
Well here it's a silly example with the shop system in the game, but if you want to extrapolate on another style, you could have an enigma with a NPC asking :
"What is my name ?


>Bob
>Ganon
>Zelda"

You have the idea. Do you think it's possible to pass some value with dialog and not only "true" or "false". In the second case, you could even pass 2 false and 1 true because there is only one good answer, but still I don't think the actual engine enable this... Is there a trick or is it impossible to make more-than-2-answers-question ? In the second case, may I open an issue to enable 3 answers (or more, all depend of the size of the dialog box and the number of lines it can contain, so let's say N-answers) questions ?

I saw the menu option and it could fit, but that's not a dialog and in my example, there could be lot of text before the question is asked... So I'm not sure menu are really the good way to do it

With Solarus 1.1, the dialog box is fully scripted and yes, you can do more than two answers if you want.
In summary, you can pass any value to a dialog, and get any value as result (a boolean, a number, a table, etc.).

All details are here: http://www.solarus-games.org/doc/1.1/lua_api_game.html#lua_api_game_start_dialog

Okay I didn't see the "on_started_dialog" event, which is explicite. The example on the doc was with a boolean, which introduced me in error because it was the way to do it on the 1.0... Anyway, thanks for the answer :)