Stuck again - SOLVED

Get help using Construct 2

Post » Tue Feb 12, 2013 3:49 pm

Still a nOOb here.

I got this to work part way, but it ain't working correctly.

I want to swipe the screen in an up or down motion and a line will draw from the start of the touch, either horizontally or vertically (depending on the general direction of the swipe) until it hits a wall on either side.

Once the line has drawn it should just stay that way.

I should be able to swipe multiple times in either direction while the lines draw.

My problem:
I can draw multiple lines, but they all flip in direction when I change my swipe direction. I only want the swipe angle to affect the line that is currently being drawn.

Capx is here (let me know if this doesn't work - I'm a nOOb at that too :o)
https://www.dropbox.com/s/u0dtzvviphscmeq/DrawLineTest.capx

TIA30FootForest2013-02-12 20:27:01
B
10
S
3
G
3
Posts: 29
Reputation: 2,692

Post » Tue Feb 12, 2013 5:06 pm

Hi! did you tried to create a clones of your lines?
example is here:
https://www.dropbox.com/s/vmlkrrcn5nry2k8/swipe.capx
B
21
S
4
Posts: 29
Reputation: 1,253

Post » Tue Feb 12, 2013 5:23 pm

Thanks a ton!
B
10
S
3
G
3
Posts: 29
Reputation: 2,692

Post » Tue Feb 12, 2013 5:29 pm

Oh oh. Answered to soon.
It is a step in the right direction though :o)

Now the problem is that when you start drawing a new line while the first line is still drawing... the first line stops drawing. (all lines should continue drawing until the ends hit the wall - so there are never gaps between a line and a wall)

B
10
S
3
G
3
Posts: 29
Reputation: 2,692

Post » Tue Feb 12, 2013 7:57 pm

Arghhh. I'm hopeless.
I got the lines drawing independantly, but now if the user changes the swipe direction while the lines are being drawn, the lines change direction in mid draw (and if half the line is finished drawing the opposite end might turn to create a 90 degree angle. ARGHHH!!!

I just want straight lines horizontallly and vertically - and no odd flippy actions!

Help!
B
10
S
3
G
3
Posts: 29
Reputation: 2,692

Post » Tue Feb 12, 2013 8:24 pm

Here try this:swipeDrawLine.capx
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Tue Feb 12, 2013 8:26 pm

THANK YOU!!!!!!!
B
10
S
3
G
3
Posts: 29
Reputation: 2,692


Return to How do I....?

Who is online

Users browsing this forum: makkancs and 22 guests