Could someone put examples of how you'd type yes or no scenarios for a text based RPG? And I mean a really basic like 'you see blah blah what do you do?'.
Also, how would you finish a code like this.
Sorry I'm fairly new to this :p
You may to also design a character/race creation option, and the skills of the character will determine how good the character is at a certain decision. For example, a Attack skill of 20 will need to be required to kill a Hobgoblin or something.
-Run energy (add agility or stamina potions and stuff)
-A shop for the player to buy/sell items(swords,shields,armors,ingredients and whatnot...)
-Magic Attacks (water spells, earth spells, fire spells and so on...)
-Range Attacks(Rapid fire, accurate attacks, switch to crossbow etc...)
basically you can achieve all these with classes/if-else statements/enumerators/arrays or vectors.
cout<<"As you were walking down the road you've encountered a goblin\n";
cout<<"The goblin wants to take your items!\n";
cout<<"What will you do?\n";
cout<<"1 - Give the goblin all my items\n";
cout<<"2 - Threaten the goblin and tell him to back off at once!\n";
if ( choice == 1 )
cout<<"You gave all your items to the goblin.\n";
elseif ( choice == 2 )
And you could add little things like that:
1 2 3 4 5 6 7 8 9 10 11 12
cout<<"Would you like to search the barrel? (y/n)\n";
if ( choice == 'y' )
cout<<"You decided to search the barrel...\n";
cout<<"You've found a healing potion!\n";
cout<<"You decided to leave the barrel be.\n";
and as i mentioned previously, Make a shop where the player can sell or buy equipments and whatnot...