text rpg help

This is a discussion on text rpg help within the Game Programming forums, part of the General Programming Boards category; hello all, need help with a text rpg (using c) how would i get it so whenever a person enters ...

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    17

    text rpg help

    hello all, need help with a text rpg (using c)

    how would i get it so whenever a person enters i at any point in the game, it would display the persons inventory? thanks in advance

  2. #2
    The Reel Thing
    Join Date
    Jun 2005
    Posts
    44
    I'm sure it's in one of the tutorials on the main page, but here's what I'd do:

    Code:
    char inputChar;
    cin >> inputChar;
    if (inputChar == 'i')
    {
       displayInventory();
    }
    Bagpipes putting the fun back in funeral.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 05-25-2005, 02:50 PM
  2. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 04:49 PM
  3. mygets
    By Dave_Sinkula in forum C Programming
    Replies: 6
    Last Post: 03-23-2003, 07:23 PM
  4. Check out My Text Rpg Game
    By knight543 in forum C++ Programming
    Replies: 3
    Last Post: 05-17-2002, 11:40 PM
  5. A "Compass" for text RPG
    By cpp4ever in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2001, 10:40 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21