How do I Make My Player Have A Particle Trail?

Get help using Construct 2

Post » Tue Aug 22, 2017 7:08 pm

How do I make my player have a particle trail which follows behind the player, changes direction based on the movement of the player (left and right) and only appears when the player is moving/jumping/falling (also disappear when player stands still)? Thanks!
B
6
Posts: 10
Reputation: 272

Post » Tue Aug 22, 2017 9:47 pm

Only one simple command:

henrypk wrote:"Player" Movement speed > 0 >>>
- "Player" spawn "Particle" on layer n (Image Point x)
- "Particle" move behind "Player"


Where the "Particle" object is a Sprite with FADE behaviour, that disappears after a certain time.
Change the duration of the fade, affects the length of the trail.

"Player" is a Sprite with a Movement behaviour (8Direction, Car, Platform, etc).

For the trail direction, this isn't necessary because the trail always goes in the opposite direction of the motion.

I also made a capx: https://www.dropbox.com/s/ajc71c4lg8ec9ze/help.capx?dl=0
Howdy, I'm HenryPK! I love helping people and making games... Hope we can be friends. (Actually developing Blue in Bitwin Entertainment: https://gamejolt.com/games/blue/321184)
B
11
S
3
G
1
Posts: 68
Reputation: 1,374

Post » Tue Aug 22, 2017 10:20 pm

Message: Malhog can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
HenryPK wrote:Only one simple command:

henrypk wrote:"Player" Movement speed > 0 >>>
- "Player" spawn "Particle" on layer n (Image Point x)
- "Particle" move behind "Player"


Where the "Particle" object is a Sprite with FADE behaviour, that disappears after a certain time.
Change the duration of the fade, affects the length of the trail.

"Player" is a Sprite with a Movement behaviour (8Direction, Car, Platform, etc).

For the trail direction, this isn't necessary because the trail always goes in the opposite direction of the motion.

I also made a capx: https://www.dropbox.com/s/ajc71c4lg8ec9 ... .capx?dl=0


Thanks for the quick reply, I will try this out!
B
6
Posts: 10
Reputation: 272

Post » Thu Aug 24, 2017 4:28 pm

Did that work? p-p
Howdy, I'm HenryPK! I love helping people and making games... Hope we can be friends. (Actually developing Blue in Bitwin Entertainment: https://gamejolt.com/games/blue/321184)
B
11
S
3
G
1
Posts: 68
Reputation: 1,374

Post » Thu Aug 24, 2017 9:45 pm

HenryPK wrote:Did that work? p-p

It worked well but I was looking for one like 'Geometry Dash' where it bursts out behind like particles. However, I've tried doing it with particles but I cannot get it to go in the opposite direction of the player. Do you have any way to do this? Thanks
B
6
Posts: 10
Reputation: 272

Post » Fri Aug 25, 2017 6:06 pm

Oh, so you want particles?

You need only two objects for that too (Sprite, Particle)

HenryPK wrote:Sprite - Platform is moving >>>
- Particle | set position to (Sprite.X, Sprite.Y)
- Particle | set rate to 35
- Particle | set angle to Sprite.Platform.MovingAngle + 180 degrees

Else >>>
- Particle | set rate to 0


When is moving, the particle is set to the Sprite position, and the rate is set to normal. Also, the angle is set to the opposite of the Sprite moving angle.

When isn't moving, the particle rate is set to zero, and it doesn't appear.

LINK: https://www.dropbox.com/s/ajc71c4lg8ec9ze/help.capx?dl=0
Howdy, I'm HenryPK! I love helping people and making games... Hope we can be friends. (Actually developing Blue in Bitwin Entertainment: https://gamejolt.com/games/blue/321184)
B
11
S
3
G
1
Posts: 68
Reputation: 1,374


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 8 guests