Need help on adding actions to

I really need help on adding actions to a text based rpg

Page 1 of 1

1 Replies - 977 Views - Last Post: 07 December 2009 - 07:05 AM Rate Topic: -----

#1 jessejayd   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 25-November 09

Need help on adding actions to

Post icon  Posted 06 December 2009 - 11:40 PM

Hello i have recently been tring to make a text based game. However i dont know how to add so when you click on something you get an item or money or both. also i dont know how to take away something such as heath stamina or energy. It would be greatly appreciated if someone posted how or posted a link on how. Please no NOOB comments, or spamming. If you have a link please include the direct link because it would be hell trying to find it.

,Thank you

Is This A Good Question/Topic? 0
  • +

Replies To: Need help on adding actions to

#2 PixelStation   User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 44
  • Joined: 12-November 09

Re: Need help on adding actions to

Posted 07 December 2009 - 07:05 AM

View Postjessejayd, on 6 Dec, 2009 - 10:40 PM, said:

Hello i have recently been tring to make a text based game. However i dont know how to add so when you click on something you get an item or money or both. also i dont know how to take away something such as heath stamina or energy. It would be greatly appreciated if someone posted how or posted a link on how. Please no NOOB comments, or spamming. If you have a link please include the direct link because it would be hell trying to find it.

,Thank you


For something like money or health, the easiest way is just to have a counter of some type (usually integers or doubles). If you don't know how to add to a variable, then I think you're getting ahead of yourself. Read some tutorials and articles online for beginner coders.
Here's a pretty simple one: http://www.cprogramm...tml#c++tutorial

Adding items to an inventory is a little more complicated and may require arrays. Again, if you don't know how to use them, look it up. These are core concepts for all types of programming, so you need to be familiar with them before planning anything like a game. Try to make a few console applications that do simple things first, like a single mode calculator or a tax calculator, etc. Once you get used to using the language, you'll start to understand how you can apply it to your game.

Good luck.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1