How do I delete only a part of background over a drawed line

Get help using Construct 2

Post » Mon Jun 09, 2014 10:48 am

Hello People!

I have a little problem with a physics game where the player can draw his own levels with the lines. I really dont know how to explain my problem by words, because my english is pretty weak, and a problem is pretty unusual i think, so i try to show.

Okay, here we got a clear level without anything by the player.

15.png


Here the player draws a line

25.png


And i need to delete a part of background that is higher than the drawed line. I found a way to do that, simply spawn a white sprite with blend mode "Destination Out" on a black layer, just like in "Lighting" tutorial, and set my tiled background's blend mode to "Source In". It works fine as you can see.

35.png


But! It works only when the line is straight, when the player draw's level with some inclined lines, everything's going bad... The ground then delete's under some lines, or dont delete at all where it's need to be deleted.

Hope you understand me, and thanks for any help... Thank you even if you just read that till here :D
You do not have the required permissions to view the files attached to this post.
Last edited by Sisyphus on Mon Jun 09, 2014 11:09 am, edited 3 times in total.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Mon Jun 09, 2014 10:56 am

Ah, cant upload more than 3 pics. This is what happens if you draw a crooked level.

45.png


And this is how i want it to be. (Paint)

55.png
You do not have the required permissions to view the files attached to this post.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Mon Jun 09, 2014 11:57 am

I guess construct 2 doesn't support what you're looking for .
B
24
S
3
G
1
Posts: 67
Reputation: 2,946

Post » Mon Jun 09, 2014 12:08 pm

daoudsami wrote:I guess construct 2 doesn't support what you're looking for .

Well, i still can make a game with just a lines. Great thanks for an answer.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Mon Jun 09, 2014 7:49 pm

I might have a solution though . If you think of a way of taking a curved line like above and split it into a group of straight lines . Then it might work
B
24
S
3
G
1
Posts: 67
Reputation: 2,946

Post » Wed Jun 11, 2014 1:49 pm

daoudsami wrote:I might have a solution though . If you think of a way of taking a curved line like above and split it into a group of straight lines . Then it might work

Nope, that doesnt work, the white thing over the line makes some parts of background transparent, some parts that i dont need to do transparent. Or maybe i just misunderstand you.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543


Return to How do I....?

Who is online

Users browsing this forum: amazingdream, Yahoo [Bot] and 21 guests