Define the race/species of a character?

Hello, I'm very new at this and I'm working on my first game (a gamebook). I would like for the player to be able to choose between being a human, an elf, a dwarf, etc. However, I'm not a coder by any means and I was wondering if someone could explain this for me.


Create an attribute like player.race...

This is from Hegemonkhan's 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
        }
      }
    }
  }
}

Alternatively, you can have different objects that the player becomes, and the human player chooses which object the game player becomes by selecting a choice on a Show Menu.


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

Support

Forums