Two important things

ITSLEO
13 Nov 2017, 20:00
  1. How can i make that the player can choose his own name in the game?
  2. How can i print a list of choises that the player can select clicking the selection point?

I'm using QUEST making a Textadventure game. Thank you in advice!
-ITSLEO


jmnevil54
13 Nov 2017, 20:06

Hegemankhan has code for this.

I have code that I took from HK, well, he sent me the link to it. You can either put this in the first room script, the start script, or you can make a function (this one is called "cc"), and then call it from the start script. If you call it, the code view is just its name:

cc

This is the actual code.

msg ("What is your name?")
get input {
  game.pov.alias = result
  msg (" - " + game.pov.alias)
  show menu ("What is your gender?", split ("male;female" , ";"), false) {
    game.pov.gender = result
    show menu ("What is your race?", split ("human;dwarf;elf" , ";"), false) {
      game.pov.race = result
      show menu ("What is your class?", split ("warrior;cleric;mage;thief" , ";"), false) {
        game.pov.class = result
        msg (game.pov.alias + " is a " + game.pov.gender + " " + game.pov.race + " " + game.pov.class + ".")
        wait {
          ClearScreen
        }
      }
    }
  }
}

ITSLEO
13 Nov 2017, 20:17

ok thanks!


hegemonkhan
14 Nov 2017, 02:01

I just used 'cc' as the name of the Function/Script, standing for 'character creation', you can name it whatever you want, of course.

I learned how to do this from Pixie's 'character creation' guide/library:

http://docs.textadventures.co.uk/quest/guides/character_creation.html

ask if you got any questions or need any help with any of this stuff.