Overlap

0 favourites
  • 8 posts
  • Hello,

    I have an inventory system where you can drag and drop objects and even combine them. For simplicity sake, lets consider a simple scenario.

    Object1 and object2 on layer1.

    InventorySlot1 and InventorySlot2 on layer0.

    When I drag object1 and drop it on object2, it should destroy both objects and create an object3.

    Here is an attached file. Could someone kindly guide me as to what I am doing wrong?

    Thank you!

  • Looks like it's working perfectly for me. They both get destroyed when I release the red over the blue and it spawns the tennis ball correctly. What's happening for you when you try to do it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, that is weird. I tried it with multiple browsers (not that it should matter) but nothing happens at all when I release the red ball over the blue one.

    Does the overlap have to be pixel perfect?

  • Hmm... I think I might know what the problem is. If you last updated C2 before Sept 29th, you might have a bug in the overlapping expression. See here:

    scirra.com/forum/bug-in-first-upload-of-r60_topic44931.html

    If you download that file and replace the old one with it, you might find it works now. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • It worked! Thanks so much.

    You know what's weird? I checked the creation date of my folder and seems like I installed C2 just 80 minutes before that post!

  • Ha, awesome! I was having the same problem until I stumbled upon that beautiful little fix. Glad to help!

  • Since this is a related question, I am not creating a new thread.

    All this works fine with 2 different objects, but if I try to do the same with same objects (blue overlapping blue) it does not recognize the overlap?

    Do I have to do something different?

  • I'll check your project when i get to my home computer, but my advice at the moment is, make them not the same. Doesn't have to be a major difference, a white dot barely visible would make them separate from each other.

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