Jump to content
Posted 18 July 2012 - 03:34 PM
Posted 18 July 2012 - 04:06 PM
Posted 18 July 2012 - 04:15 PM
Posted 18 July 2012 - 08:21 PM
Perhaps start with telling us what is it exactly that you need the inventory system to do? Do you need to track the location and status of every item in a dungeon or would something like Hero.HealingPotionCount++ be sufficient?
What kind of language are you using?
Edited by Phil123, 18 July 2012 - 08:34 PM.
Posted 19 July 2012 - 07:36 AM
Posted 19 July 2012 - 08:19 AM
Posted 19 July 2012 - 10:03 AM
How about something like this(just a rough and simple outline):
Forgot about consumables when writing that, left some blanks as well, but I think this can get you going.
Anyway, I hope I helped at least get the creative juices flowing. Also, I'd love to hear what your ideas are at this point. You may not have an answer yet, but you must have the beginnings of what your inventory will look like.
Posted 19 July 2012 - 11:24 AM
Posted 21 July 2012 - 07:09 PM
Edited by Phil123, 21 July 2012 - 07:10 PM.
Posted 23 July 2012 - 09:55 AM
Posted 23 July 2012 - 01:17 PM
Edited by ZBethel, 23 July 2012 - 02:49 PM.
Posted 23 July 2012 - 08:39 PM
why do you have c and temp objects?
What I'm asking is wont you have like 3 different swords with various stats?
The way you have set this up it seems like you can't expand it, the user can't have 5 differente unique weapons or clothing, only 1 of each.
Your item hierarchy is fine, its just your c and temp globals that make this very unusual.
Like i said if your layout is working fine and your game is behaving how you want, you can just ignore me. I just want to help
Start somewhere, and as you discover things that you need or approaches that don't work, take a step back and refactor.
I probably rewrote it three times until I found a design that I liked. It wasn't that I didn't figure out everything beforehand, it was mostly that my naive ideas of what I thought would work ended up being rather mediocre in the end, and I found better ways to do it only because I messed up the first two times.
Edited by Phil123, 23 July 2012 - 08:48 PM.