Remove the sprite between two others

Get help using Construct 2

Post » Tue Aug 30, 2016 9:34 am

Hello! Tell me, I need the red sprite removed only if the top and bottom are blue sprites (or left and right) Attach the picture for clarity, just stuck a simple scene, but I was not able to solve the problem, thanks for help.
Here is the link to the scene and image: https://drive.google.com/drive/folders/ ... kxzZ1NHVkk
B
10
S
1
Posts: 20
Reputation: 1,203

Post » Tue Aug 30, 2016 3:41 pm

Message: Baionera can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hey, I'm not sure if this would work for you, but you could make an invisible sprite that extended its width between the centers of the 2 blue sprites.
Then you could check if the invisible sprite is overlapping a red sprite, and if it is, then destroy the red sprite.

Here's an image for help:
https://drive.google.com/open?id=0B1kpIFDOOo9HSWREb0M1YmhPS2s
Hope it helps !
B
5
Posts: 23
Reputation: 271

Post » Tue Aug 30, 2016 4:22 pm

good idea, but in the game it may happen that the figures should be blue red block to remove it, as they do to the red figure was gone after 2 blue cross the green line?
B
10
S
1
Posts: 20
Reputation: 1,203

Post » Tue Aug 30, 2016 6:02 pm

I'm sorry, but could you please rephrase your question? I can't seem to understand what you're asking now =( .
B
5
Posts: 23
Reputation: 271

Post » Tue Aug 30, 2016 6:24 pm

Sorry for my english. If you take your choice. it is necessary that after the two blue sprite to touch the green line, red sprite retire
Here is a screenshot of my scenes: http://clip2net.com/s/3BIXOj0
But it does not work, probably something I'm doing wrong
B
10
S
1
Posts: 20
Reputation: 1,203

Post » Tue Aug 30, 2016 6:49 pm

So, from what i can understand, you want to destroy the red sprite, right? Then try to test if the green line is overlapping the green light. If it is then destroy the red sprite.
Do you want the same to happen for the blue sprites ?
B
5
Posts: 23
Reputation: 271

Post » Tue Aug 30, 2016 6:51 pm

Never mind! I see what's wrong. You don't need variables for what I'm proposing. You have a green object, 2 blue objects, and a red object.
You have to check if the green object is overlapping the red object, not the blue ones.

Did it help ?
B
5
Posts: 23
Reputation: 271

Post » Tue Aug 30, 2016 6:57 pm

It is necessary that when two objects are blue on the green line, remove red object
http://clip2net.com/s/3BJ1BBD
B
10
S
1
Posts: 20
Reputation: 1,203

Post » Tue Aug 30, 2016 7:09 pm

Message: Baionera can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Try this: https://drive.google.com/open?id=0B1kpI ... V9VcDE0TFk
B
5
Posts: 23
Reputation: 271

Post » Tue Aug 30, 2016 7:11 pm

The link does not open :(
B
10
S
1
Posts: 20
Reputation: 1,203

Next

Return to How do I....?

Who is online

Users browsing this forum: AndreasR and 15 guests

cron