0 Favourites

Seemple eenventory

  • Okay like totally, like oh my goood, like whatever, liiiiike....

    Totalleh can't figure this out, I mean, I look up tha tutorialz on inventories and I just don't get it, but they get real descriptibe about a bunch of stuff my mind cannot comprehend.

    I wish I could understand arrays, I really do, I look up videos and read stuff online and I see things happening but I just don't get it.

    What practically all of them lack is a reference to how certain things would work with actual video games. If they showed stuff like that, that would make everything like totalleh easier. I guess i'm more of a visual learner.

    Anyways I just started on a tangent so I will just ask this quick.

    I'm working on a rpg, and have gotten to this very crucial part. I just need an inventory system where you get an item, and they show up as text in a menu that can be pulled up later. I also of course need it possible to throw away items, and have all items able to be stacked. If you ever played super hydlide, that is EXACTLY the system I am looking for.

  • Visual Learning Array:

    youtube.com/watch

    Now that you watched video:

    This is pretty good: scirra.com/tutorials/614/array-based-inventory/page-1

    And so is this one:

    scirra.com/tutorials/244/rpg-inventory-drag-and-drop

  • Dictionary is simplier than array.

    slot1 = "text1"

    slot2 = "text2"

    etc

    Delete key "slot2" deletes entire slot2 entry.

    And you can get either the key or value so you can see if he has slot2 filled, or if he has cold coin

    Its super easy to understand

    Add key "slot3" value "text3"

    So we have:

    slot1 = "text1"

    slot2 = "text2"

    slot3 = "text3"

    Very simple inventory system. But arrays are better, but dictionaries are simple.

    scirra.com/manual/140/dictionary

  • The video was fine, but I still don't know how to come up with an inventory idea out of it. The tutorial here scirra.com/tutorials/614/array-based-inventory/page-1

    Was okay until he showed his visual algorithm, because then everything just got real complicated way to fast. And the last tutorial isn't exactly what I'm trying to do.

  • You can't build an array without wrapping your head around how it works/looks

    Think 3 dimensional.

    plantation-productions.com/Webster/www.artofasm.com/Linux/HTML/Arraysa2.html

    And when you understand, then its a lot of work and lots of testing to ensure that correct data is being stored, retrieved etc

    It doesn't always work out as you planned and requires a lot of trial and error. I've been busy for the last month on data storage and retrieval. Some data needs to be randomized, some needs to checked against multiple criteria, no duplicates etc etc etc and I have not even halfway done.

    Inventory systems are easy - wait till you have your hero accoplish tasks and check that those task are done in order to unlock/lock other tasks - lol.

    I haven't made a rpg, but what I've heard it is one of the hardest games to make - lol, don't worry, they say it's also one of the most rewarding.

    Check out C-7's game - scirra.com/forum/courier-play-now_topic62387.html

    For inspiration <img src="smileys/smiley2.gif" border="0" align="middle" /> Motivation <img src="smileys/smiley32.gif" border="0" align="middle" /> And help keep you see bigger picture <img src="smileys/smiley10.gif" border="0" align="middle" />

  • An rpg does seem difficult to create, but I have a good idea on how to implement everything so far, stats, leveling, attacking, algorithms and all that.

    But this inventory system is literally the one thing that has been standing in my way the past few days. I really would like to figure this out. You mentioned dictionaries, those seem like a better idea for this.

    Can you go a little more in depth with them? Are they able to work this way: Items can get added and show as text, maximum amount of slots, items can be thrown away, number of specific item shown next to it?

    Please if you could just explain a little bit more. This has been really frustrating. I found this tutorial and it seems to be what I want scirra.com/tutorials/583/easy-inventory-using-an-array but I'm having a stupid amount of trouble trying to figure out how to replace the imagery with text.

  • I found this tutorial and it seems to be what I want scirra.com/tutorials/583/easy-inventory-using-an-array but I'm having a stupid amount of trouble trying to figure out how to replace the imagery with text.

    Hi, tutorial creator here. Could you explain what exactly you mean by "how to replace the imagery with text." I'm sure I could help you figure it out.

  • So your items are images and change animations depending on the item ID right? Well i'm trying to replace it so that instead of the colored block showing in the slots, it's text depicting the item instead.

  • You could store all the item names in a string as Item1;Item2;Item3 then replace all the stuff to do with the item object using a text object. And then for setting the animation name just do

    Text: Set Text to tokenat(ItemNames, ItemID - 1, ";")

    That will get the item name from the string at ItemID. the - 1 is there because 0 in your item index would be nothing whereas the itemlist's 0 would be an item name.

    I'm not completely sure if the above makes sense, I'm very tired right now.

  • Could you make a capx of what you explained sometime?

  • Yes, but it will have to be tomorrow when I get home from school. Maybe 5pm MST I'll have it for you.

  • ok, thanks a bunch

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I think i got it, I'll try to make a simple inventory. I'll have it when I come back from work tomorrow, in about 18 hours from now :D

    (in case no one else post something better sooner)

  • It's been about 18 hours now I counted

  • The others who promised examples are better examples than what I have - trust me, but mine is different cause it highlights the dictionary functionality - this isn't better by any means, just easier to understand.

    Here is A very very simple inventory using dictionary as you don't seem to be able to wrap head around array.

    dropbox.com/s/dfku07d4cihwzi0/Very%20Very%20simple%20inventory.capx

    This is very simple, and needs lots of work if you go this route, but at least you can see visually via text and you can play around with it.

    It uses dictionary, not array for simplicity.

    I used touch object as that is recommended if you want to put game online. Most devices haven't got a mouse.

    Just click with your mouse on Sword, Shield, Axe and see it added to slot(s). Click Slot(s) to remove Inventory Items.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)