How do I create a smooth curved line?

Get help using Construct 2

Post » Sun Jul 12, 2015 8:09 pm

You can make also for r206 if you want I take a look
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Sun Jul 12, 2015 8:28 pm

Here it is!

Thanks for your time!
B
17
S
3
Posts: 62
Reputation: 1,054

Post » Sun Jul 12, 2015 9:17 pm

Complicated to explain .
In fact, the sawtooth effect is due to your enemy that creates sprite going straight ( 90 ° angle in your case ) but with the number created and the rapid movement of your enemy , you have an effect of optical . If you put a speed lower sprite creation (using "every x sec : spawn bullet " , you can see that they will stupidly straight ) .
I think you should diminish the number of "bullet" and that you apply a path to your "bullet" to fix it and have a curve.
The start angle is defined by the direction of the enemy and as soon as the "bullet" is close to the edge of the area , it changes direction
I don't know if I explain myself properly ( English is not my native language )
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Sun Jul 12, 2015 9:36 pm

I'll try it but, yes, is very difficult to understand. If you can make me a capx, also with my capx modified, I ll be very grateful and i ll try to figure out. Thanks!
B
17
S
3
Posts: 62
Reputation: 1,054

Post » Sun Jul 12, 2015 9:50 pm

You can try :

spawn bullet with angle of motion = 45° depending of the direction of your ennemy
check if bullet is near to viewport, then bullet rotate to invert(current angle)

Hope that helps
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Mon Jul 13, 2015 7:29 am

@MadSpy Sorry but I have not yet understood, the Enemy sprite bounce on the green sprite, not the viewport.

@LittleStain any solution?
B
17
S
3
Posts: 62
Reputation: 1,054

Post » Mon Jul 13, 2015 11:09 am

the bullet bounce on the limit's viewport...your enemy doesn't interfere with the trajectory of the bullet...

perhaps @LittleStain or one of the hundreds who read this post could explain that better than me (my English has its limits)
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Mon Jul 13, 2015 11:20 am

I'm not quite sure what the effect is you want..

Right now you are changing the direction of the bullet 180 degrees immediately on collision.
It's not really strange that this produces a "corner", going from 400px per second Left to going to 400px per second Right
There are many ways to "solve" this, depending on your needs.
Decreasing the speed depending on the distance to the turning-point would be the easiest way while keeping the rest of your setup nearly the same,
but there are probably much better ways of achieving this (using different behaviours and/or without behaviours) if it was clear what you are trying to achieve and when and why..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jul 13, 2015 12:14 pm

You can still use it @MadSpy no matter in what version he creates it. Just take his capx and extract it using something like winrar or 7-zip to a folder. Then in that folder open the caproj file with notepad/wordpad.
Then on the line
<saved-with-version>20000</saved-with-version>
Change that number to your version. If your version is 206 then the number should be 20600, if your version is 200 then change it to 20000, if 207 change to 20700, etc...
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Mon Jul 13, 2015 12:23 pm

@LittleStain
I think he wants something like this (in better way I guess)

@VIKINGS
I haven't thought about it, thanks lol
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: plinkie, rayolf, Yahoo [Bot] and 7 guests