[SOLVED]Pick instance overlapping a sprite

0 favourites
  • 4 posts
From the Asset Store
A set of 10 pixel art animated magic effects with icons. 2 Fire, 2 Earth, 2 Wind, 2 Water, Portal, Explosion.
  • Hi, I want my game to destroy the instance of my Ball-Sprite that is overlapping a sprite without destroying the other instances of the Ball-Sprite, how can i do that ?

    I try with "pick instance overlapping point", but a 1x1 point is too small (and too short in terms of time in-game) for this, I really need a bigger area.

    I also wonder how to give a name/a value to a specific instance, I can't find any actions to modify/pick instance

  • Hi see if this helps. Click on a ball to assign a value to it.

  • Ok thanks, actually I just didn't understand why here it destroys only the ball that hit the sprite, while in a condition with keyboard pressed --> destroy ball , it destroys all the balls. Anyway, you solved my problem, thank you very much ^^

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Because if you just do 'on keyboard pressed', you're not picking any objects. Actions work on picked objects. If you don't pick any specifically in an event then all of the object type are picked. So in the case of 'key pressed' the condition doesn't pick any balls so they are all picked by default, and you get all the balls destroyed, whereas in mine I've picked the one touched/clicked on.

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