How do I make an object leaving a trail path.

Get help using Construct 2

Post » Fri Jan 22, 2016 9:17 pm

I want to drag my player, he leaves a trail path.
I have a Player object with drag & drop behavior when dragging the player will want him leaving a trail . I already tried to create the trace object in the position of the player, but when I drag very fast the player , it places without trace. Sorry for my terrible English.
Image
Image
Image
B
6
S
1
Posts: 29
Reputation: 465

Post » Fri Jan 22, 2016 10:09 pm

If you add sprite for the line and set it's origin to the right, and have at least one instance, this would work:

sprite: picked top instance
system: compare distance(Mouse.X,Mouse.Y,Sprite.X,Sprite.Y) > 48
---system: create sprite at (sprite.x,sprite.y)
---sprite: set angle toward (mouse.x, mouse.y)
---sprite: move forward 48 pixels
B
100
S
38
G
134
Posts: 5,554
Reputation: 85,321

Post » Fri Jan 22, 2016 10:35 pm

When I drag a very fast player, it happens .
Image
B
6
S
1
Posts: 29
Reputation: 465

Post » Sat Jan 23, 2016 6:50 am

What's happening in your capx is different than what I described. As written that can't happen.
If it helps replace "Sprite" with the object you want to use as a dash, and replace "mouse" with the object you want to create a trail.
B
100
S
38
G
134
Posts: 5,554
Reputation: 85,321

Post » Sat Jan 23, 2016 11:07 am

I'm not getting , you could set an example? Thanks
B
6
S
1
Posts: 29
Reputation: 465

Post » Sat Jan 23, 2016 11:26 am

seymore wrote:I'm not getting , you could set an example? Thanks


R0J0hound's instructions work for me:

https://www.dropbox.com/s/7i7f68g7d4yhncs/dndtrail.capx?dl=1
If your vision so exceeds your ability, then look to something closer.
Moderator
B
145
S
33
G
89
Posts: 5,909
Reputation: 62,581

Post » Sat Jan 23, 2016 12:10 pm

Wow, was that really what I wanted. Thank you very much, R0J0hound and zenox98.
B
6
S
1
Posts: 29
Reputation: 465

Post » Fri Jan 29, 2016 1:56 pm

I have a projet where object leave path. If you want, I can send it on your email
B
2
Posts: 3
Reputation: 156


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, sonicwiz and 1 guest