Originally Posted by
Luminous Lizard
Then in the main I made 4 HighElf Dwarf human and ork and have them being able to access everything in player. But how would I present a choice, as in when the game loads up you have 4 characters to choose from. All with different attributes?
Well, you could have a ChooseChar function, in which it gets the players choice, and depending on that choice sets the attributes.
like, for example:
Code:
int agility;
int strength;
ChooseChar ()
{
enum Race (orc, human, elf);
Race choice;
//get choice
switch (choice)
{
case orc:
agility = 3;
strength = 10;
break;
case human:
agility = 5;
strength = 5;
break;
case elf:
agility = 8;
strength = 4;
break;
}
Player player (strength, agility); //create player with attributes
}
or something like that.