This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
elfin8er's profile picture

[Question] Making an inventory for my adventure game

Started by elfin8er, 30 August 2012 - 03:19 PM
elfin8er #1
Posted 30 August 2012 - 05:19 PM
I'm working on trying to make my first adventure game in CC. So far I have a simple player creation system, with three classes, but now I want to make an inventory system. I want players to be able to see the items in their inventory, equip items, through items out, pick items up, ect. What would be the best way to go about this?

If anyone would like to see the code I have to far, let me know. I'd be more then happy to post it, and get any tips I could.
Kingdaro #2
Posted 30 August 2012 - 06:47 PM
Perhaps you could create a key to open up the inventory menu, where it would list all of the items. The selected item would have brackets around it.

[ item ]
  item
  item

Pressing whatever key to select it, a menu would pop up alongside the item to do stuff with it.

[ item ]   drop
  item   [ equip ]
  item
elfin8er #3
Posted 30 August 2012 - 06:54 PM
Perhaps you could create a key to open up the inventory menu, where it would list all of the items. The selected item would have brackets around it.

[ item ]
  item
  item

Pressing whatever key to select it, a menu would pop up alongside the item to do stuff with it.

[ item ]   drop
  item   [ equip ]
  item
I was sorta thinking of the same thing, but I'm having trouble with the coding bit. How to list the items without breaks in the middle, how to keep track of the players inventory, ect.
elfin8er #4
Posted 03 September 2012 - 12:27 AM
Bump! (Let me know if bumping isn't allowed.)