How do I fix my Collisions?

0 favourites
  • 3 posts
  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure if I understand the problem, but can't you just use "Pick nearest Item" condition?

    Item on layer HUD
    Item pick nearest to (SelectionDevice.x, SelectionDevice.y)
    
  • *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

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