Pop-up menu to prevent confusion?

Hi. I'm trying to get the game to except player input. I think I need a pop-up menu to prevent confusion.

How do I do it?
What I have:
get input {
game.pov.alias = result
msg (game.pov.alias)
}
msg ("Hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii!

....
Righto.

Now, Pokemon, they are... magical creatures. Sometimes they are animals. Sometimes they are objects come to life. And pokeballs. Depending on whether you watch the anime, play the game, read the manga, and etc., Pokemon are either magical animals that are so overpowered you enslave them, or they are magical animals that are your friends, and for some reason follow you because you beat them in battle, Greek or anime logic, or something.")
msg ("What is your name? (Type something)")


I'm not clear on what you want or are asking for, but here's some stabs at it:

// no menu:

msg ("Hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii!

....
Righto.

Now, Pokemon, they are... magical creatures. Sometimes they are animals. Sometimes they are objects come to life. And pokeballs. Depending on whether you watch the anime, play the game, read the manga, and etc., Pokemon are either magical animals that are so overpowered you enslave them, or they are magical animals that are your friends, and for some reason follow you because you beat them in battle, Greek or anime logic, or something.")

msg ("What is your name? (Type something)")

get input {
  game.pov.alias = result
  msg (game.pov.alias)
}

// --------------------------------------------------------

// popup menu (you can't really use it with naming your character, unless you want to have pre-set names to pick from):

http://docs.textadventures.co.uk/quest/scripts/show_menu.html

<game name="example_game">
  <attr name="sex_stringlist_attribute" type="simplestringlist">male;female</attr>
</game>

<object name="room">
</object>

<object name="player">
  <attr name="parent" type="object">room</attr>
  <attr name="sex_string_attribute" type="string">unknown</attr>
</object>

// scripting somewhere (Verb / Script Attribute, Function, Command, Turnscript/Tmer, Object Type, etc)  in game / game code:

show menu ("Age?", game.sex_stringlist_attribute, false) {
  player.sex_string_attribute = result
}

// in-line (in big text box as clickable hyperlinks) menu:

http://docs.textadventures.co.uk/quest/functions/showmenu.html

<game name="example_game">
  <attr name="sex_stringlist_attribute" type="simplestringlist">male;female</attr>
</game>

<object name="room">
</object>

<object name="player">
  <attr name="parent" type="object">room</attr>
  <attr name="sex_string_attribute" type="string">unknown</attr>
</object>

// scripting somewhere (Verb / Script Attribute, Function, Command, Turnscript/Tmer, Object Type, etc)  in game / game code:

ShowMenu ("Age?", game.sex_stringlist_attribute, false) {
  player.sex_string_attribute = result
}


there's also the very useful 'split' Script/Function, which is a very quick way of creating (and returning) a list:

http://docs.textadventures.co.uk/quest/functions/string/split.html

for a quick example:

ShowMenu ("Age?", Split ("male;female", ";"), false) {
  player.sex_string_attribute = result
}

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

Support

Forums