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
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

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
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

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://dl.dropboxusercontent.com/u/34306693/dndtrail.capx
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,388
Reputation: 58,458

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: NN81, Yahoo [Bot] and 27 guests