Collision with sprite destroying specific text?!

Get help using Construct 2

Post » Fri Oct 26, 2012 5:10 pm

I have many instances of texts that are pinned on balls (sprites).

I would like that when one ball collides with another object, just the text instance that are pinned on the ball is destroyed.

Instead of that all the text instances have been destroyed.

How do I make to destroy an specific instance of the text when my ball collides with another object?
B
3
Posts: 12
Reputation: 699

Post » Fri Oct 26, 2012 5:26 pm

There's a few different ways, but one of the easiest ones for me to wrap my head around is this.

Sprite (on collision with object) -> find nearest (text)

then in a sub event

text -> destroy

The trick is making the text/destroy action a sub event of the previous event that "picks" or selects the nearest text (this narrows it down to only the closest one that gets destroyed instead of all of them.)
B
50
S
21
G
8
Posts: 844
Reputation: 10,299

Post » Fri Oct 26, 2012 6:35 pm

I Got it !!! Thanks a lot!!!!Tatiana Conde2012-10-26 18:35:46
B
3
Posts: 12
Reputation: 699


Return to How do I....?

Who is online

Users browsing this forum: Scofano and 27 guests