RPG Inventory.

0 favourites
  • 15 posts
From the Asset Store
Advanced inventory mechanics for your RPG game (Array-based). Take Items, split them, pick up them, read the description
  • Can't find a 'tutorial' that explains how to do this for someone lacking experience.

    Looking for a simple 'English' guide on how to make the most basic inventory.

    Kill monster > Drop Item > Walk Over item > Adds item to inventory.

    Please don't send me a link to a previous tutorial. Asking for assistance here.

  • What kind of inventory would you like?

    How many kinds of objects are there?

    Could you hold more than 1 of those objects?

    How would the player use those objects?

    There are many examples on the forum as well, did you try a forum search?

  • 2x2 slot inventory.

    Just one for now.

    Yes, and they stack on top of each other, saving inventory slots.

    Run over object to pick up.

    I did forum search, but alot of it directs to array, "poorly" made/worded array inventory guides.

    But I am yet to find one that is worth learning from.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 2x2 slot inventory.

    Just one for now.

    Yes, and they stack on top of each other, saving inventory slots.

    Run over object to pick up.

    I did forum search, but alot of it directs to array, "poorly" made/worded array inventory guides.

    But I am yet to find one that is worth learning from.

    All of them are worth learning from, even the bad ones..

    They will give you understanding in how Construct2 works..

    So it seems you want something like:

    player on collision with ammo

    • System add 1 to Global variable Ammo
    • Ammo destroy

    Or maybe you'd like to use instance variables on the player, but it would work the same..

    All you'd have to do than is to create a visual representation of the values of the variables..

  • All I am trying to do at this point is:

    Kill monster then spawn object.

    Collide with object adding it to inventory.

    Push 'key' to view inventory and able to see object inside.

  • So:

    Monster on destroyed

    monster spawn object

    Player on collision with object

    destroy object

    add 1 to global variable Objects

    On button clicked

    text set text : "objects in inventory"&Objects

    If you want to visually display the inventory, you should first make the visual display..

  • Found all that stuff out on my own, but visual display? i make a sprite of the inventory layout or something?

  • I don't know what you would like your inventory to look like..

    Maybe you have animationframes to show how much/many of an object you have, maybe you'd like to use text, etcetera..

    Simply put, something like this:

    First you check if you have the object(s)

    (Variable > 0)

    If so you make a visual representation of that object and its value

    create object (set object visible)

    set text to Variable

    else

    destroy object (set object invisible)

    set text to ""

  • nah bro you're talking a different language now, thanks anyway...

  • all I want is ( completed tasks are marked as done obviously )

    Kill monster and spawn object ( DONE )

    Player Collide with Object add to variable ( DONE )

    Open inventory display using key or mouse click ( ?? )

    View Object/Variable in Inventory ( ?? )

  • Do you have objects/sprites to display your inventory?

    if so, set them visible when displaying the inventory and set them invisible when not displaying the inventory..

    for example:

    create a global variable inventory

    on key i pressed

    system set variable inventory : 1-inventory

    variable = 1

    set all objects that create the visual display of your inventory visible

    variable = 0

    set all objects that create the visual display of your inventory invisible

    The visual display could be sprites/tiled-backgrounds/text-objects etcetera

    Now all you have to do, if you want to display the amount is set the text-objects to the variable number and you are ready..

  • nah bro you're talking a different language now, thanks anyway...

    I'm just explaining the logic..

    But you are right, I wouldn't use words like "nah" and "bro"

  • ended up figuring it all out with trial and error.

    Thanks for support.

  • For anyone interested:

    Simple inventory

  • I did my rpg inventory using this;i dont this:

    w ww . sci rra .com/tutorials/614/array-based-inventory

    Kill monster and spawn object

    Player Collide with Object add to variable

    but i want to do, can you share how you do this?

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