ShineShrine's Recent Forum Activity

  • Im not to great at writing stuff in a JSON file like that but I can give it a shot. What I was hoping to happen was I would have a 3x3 grid and I would drop my items from my inventory in there and then based on how they were configured the game would have an output that would give me a different item. I guess I could have special slots for crafting and check for different configurations for each recipe but I was hoping I could just automate it a bit more. Could I do this with an array?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • okay, but how could I do that with a grid?

  • Hi,

    I just finished creating an inventory system for my survival game and now I am moving on to a crafting system. I don't really know how to approach it. My inventory system is centered around sprites with different animations, frames, and instance variables that make them the specific item they are. The animations help to show what category the item is (resource, tool, armour, or food and drink). The frame is the the items ID within their respective category. The instance variables show specifics such as amount of item in inventory or resources and food and drink, and durability and damage for stuff like tools and armour. To me, my item system seems a little complicated, so I am stumped on how to build a crafting system with this. I would like the system to be like minecraft's crafting system but i don't know how to pre make recipies. The inventory system uses inventory slots that have instance variables that carry each specific item's information when they are in the specific slot. Does anyone have any advice or ideas? If you need any more elaboration please ask

  • Thanks for the help! sorry about the longer wait for a response, i was busy this week. The pick all condition worked great! My inventory system is now fixed

  • Hi,

    I am developing an inventory system for my survival game but I came across some problems with snapping each item into its inventory slot. The system uses sprites to represent the items in your inventory. The sprites have the drag and drop behavior so you can move them around. The slots in the inventory allow for the items to be organized. When items are overlapping the inventory slots, the game does a bunch of checks to make sure that slot is not already taken. If it isn't then the item will easily snap to the slot. This works great. The trouble comes when another item is dropped over the occupied slot. The slots have a boolean that is true when it is occupied. The item dropped on the occupied item will then freeze in its position and not find a new slot to snap too. The item will in fact find a new open slot when it is dropped outside the inventory, not overlapping a slot. Here are the events, the inventory itself, and the problem with overlapping:

    I am really stumped on how to make this work, this is the final piece to creating a working inventory. Everything else is working flawlessly to this point except for this, can anyone help?

    Tagged:

  • *slaps forehead

    thanks for the response, this worked great! but I realized my mistake, the events for the collision check were on a separate event sheet that was supposed to be included on my main event sheet but wasnt lol

  • Hi,

    I am having a problem with collisions in my inventory system for a survival game I am developing. The system has a hot bar which allows me to move items to it for easy access. The hot bar's sprite has 4 extra image points for the selection device (which shows which item is selected in your hand). Based on the selection device's instance variable, it will set its position to that image point to simulate choosing an item. I was working on detecting different items when they are in the hot bar. I looked for an overlap of the selection device and the item sprite using multiple methods such as picking the specific instance of the item sprite and checking for a collision offset but I have yet to get any collision. The items move from the inventory layer to the normal HUD layer when going to the hot bar if that helps a bit. I hope I explained this situation well enough. Can anyone help?

  • Thanks, the "for each" loop worked to get the hot bar showing the items!

  • Hi,

    I am creating a survival game, and in it the player has an inventory with a hot bar. When inspecting the inventory, players can move items from their category slots to the hot bar slots. I have two sprites, both are the same in terms of animations and frames. One is for the actual inventory items, the other is used to display the items that are in the hot bar. I am trying to use these events which compare the instance variable of the hot bar item to the inventory item so that if they are the same, the hot bar item will change its animation and frame to match that of the inventory item but it is not working:

    Any tips on how to get this to work?

  • Hi all,

    I've been working on a character customization inside my survival game which uses the Color Replace effect to change your hair color and your skin tone, but I am stumped on how to use it. I looked to the demo game Demonire as a reference because it utilizes this effect to change the color of your sword and cloak. This is what that code looks like:

    And then when this didn't work, I read a post that said the parameters is based on each rgb input (1 = Red, 2 = Green, etc.), so I created a copy of the code and did this:

    None of these work to change the character's skin color. All it changes is the white in the character's eye to black. Can anybody help?

  • Okay, At first it didn't work but then I found the problem: When the Instances are first created at the start of the layout, they didn't set their slot numbers equal to that of the slot they were originally over meaning when I moved them away from the slots, they had no slot number imputed. Thanks again for the help!

  • Hello,

    I am creating a survival game with an inventory system. The inventory system consists of three objects, the inventory slot, the resources, and an array to keep track of everything. The resources, a single frames with multiple frames that correspond with the Item ID, can be moved around through the drag and drop behavior when the Inventory is active. When the item is over a slot, it will snap to the spot so that you can organize your inventory how you like. This system is created by using instance variables. Each slot has its own slot number that makes it unique. The items have a the same instance variable that changes based on what slot it is in. When I drag one of the items away from the slots, it does not snap back to its original slot, the slot that shares the same slot number instance variable. Here is a screen shot of the code

    When the items (AlmightyStuff) is dropped, the game will check to see if it is overlapping any inventory Slots (InvSlot). If it is not, the game then compares the inventory Slots' instance variable Slot Number to that of the items's. If they are equal, then the items should set its position to that inventory slot.

    In theory, this should work, but it doesn't. Does anyone know how to fix this?

ShineShrine's avatar

ShineShrine

Member since 22 Feb, 2019

Twitter
ShineShrine has 1 followers

Trophy Case

  • 5-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

8/44
How to earn trophies