Problem with picking objects...

This forum is currently in read-only mode.
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Alrighty, so you might be familiar with ? blocks in Mario games -- you jump up and hit them from the bottom and either an item or a coin comes out. I had to use the Pick closest condition to make sure only the block you hit is activated, and that worked fine.

    But then I realized, it still has to work if you're standing between two blocks that are right next to each other and you hit both at the same time. The Pick closest can't work, since that'll only activate one of them by definition, but I don't know what else to do. I reworked it to not use the Pick closest, since I apparently only needed that since I set up the collision condition wrong, but it still won't work for two. They both do the little bounce from being hit, but only one coin comes out of one block.

    Here's a screenshot of the two events involved in this:

    http://oi53.tinypic.com/54ucd3.jpg

    (It occurred to me that it might be creating two coins like it should, but at the same position so that it only LOOKS like there's one, but I confirmed that that's not the case in debug. Only one coin is being created.)

    Suggestions?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add a "for each itembox" condition to event 104.

  • Wow... that didn't even occur to me. Never used that condition before.

    Thanks a bunch, works perfectly now.

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