[SOLVED]Pick instance overlapping a sprite

Get help using Construct 2

Post » Mon Nov 24, 2014 5:15 pm

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
Last edited by Dryon on Tue Nov 25, 2014 3:50 pm, edited 1 time in total.
B
3
Posts: 2
Reputation: 179

Post » Mon Nov 24, 2014 9:06 pm

Hi see if this helps. Click on a ball to assign a value to it.
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Tue Nov 25, 2014 3:43 pm

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 ^^
B
3
Posts: 2
Reputation: 179

Post » Tue Nov 25, 2014 8:58 pm

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.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: t redeemed t and 8 guests