ShineShrine's Forum Posts

  • 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?

  • Okay thank you so much

  • Hi,

    I was recently editing a tilemap in a game of mine to compare color schemes of a layout. I changed the color of some tiles and then after I saw them in the layout, I hit the undo button to return them to their original color. The screen suddenly got a red tint and it told me there was an error with changing the duration of a non-animate object which makes no sense because you can't even do that in a tilemap. Here is a picture of what it looks like.

    Does anyone know what's going on?

    Tagged:

  • Actually, I think I figured it out. Thanks for your help oosyrag!

  • Okay, since I am having the special tiles spawn over the land tiles, would I need to do a repeating system that checks all tiles for the specific Advanced Random value? Also, I already have one of those systems for the initial island generation so I don't know if that will effect it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry, I am still a litte confused. I see that I can use Tile to Position to convert the between layout coordinates and Tiles. I am not sure if this is what you mean by Absolute Tilemap position or index. Can you elaborate a little more?

  • Okay, I think I have that part down. The part I am stuck on is when I compare the Advanced Random's Texture Value, I need a position to lock on to.

    In this image I have two question marks where a certain position should be. I need that position to be a position on my tilemap. I have looked through the Tilemap Documentation and haven't found an expression that I can use. Do you know any that would work?