Is there a way to give a sprite a trail? Forum Home > Construct 2 General > How do I....? |
Post Reply
|
Page 12> |
| Author | |
Post Options
Quote Reply
Topic: Is there a way to give a sprite a trail?Posted: 14 Dec 2011 at 11:48pm |
|
|
Is there a way to do this? I'm about to head out so I can't look it up. Could someone answer this for me?
Thanks for your time! |
|
![]() |
|
Post Options
Quote Reply
Posted: 15 Dec 2011 at 1:53am |
|
|
I'm also looking for something similar, if i understood you correctly. Like, the player object constantly creates new objects, which fades within x seconds?
|
|
![]() |
|
Post Options
Quote Reply
Posted: 15 Dec 2011 at 2:14am |
|
|
Yes, that's exactly what I'm looking for. I'll let you know if I find a way.
|
|
![]() |
|
Post Options
Quote Reply
Posted: 15 Dec 2011 at 2:22am |
|
|
I dont have the time to experiment, but try fooling around with emitting the same object from a desired angle, from the player, then fading it.
I assume you could start with making a single object, create the desired behaviour (movement, scaling, fadeout), then for example make the player object create that object every tick while moving or something. Im just thinking loudly here :) |
|
![]() |
|
Post Options
Quote Reply
Posted: 15 Dec 2011 at 7:01am |
|
|
EDIT:
removed lame pseudocode and added example: http://dl.dropbox.com/u/45711709/trail.capx done :D this ofcourse spawns MANY sprites... so you might need to adjust the values to make it look good / don't kill the performance Edited by Ize - 15 Dec 2011 at 7:09am |
|
![]() |
|
Post Options
Quote Reply
Posted: 15 Dec 2011 at 8:20am |
|
|
Just make a event that for every x seconds create a the trail sprite.
Set the trail to head of in a direction and fade after x seconds. I do this to simulate smoke. |
|
![]() |
|
Post Options
Quote Reply
Posted: 15 Dec 2011 at 12:07pm |
|
|
easy peasy
http://dl.dropbox.com/u/23551572/C2/trail.capx need Canvas Plugin (will be a lot faster once Canvas will be webGL compatible) Edited by Yann - 15 Dec 2011 at 12:07pm |
|
![]() |
|
Post Options
Quote Reply
Posted: 15 Dec 2011 at 12:31pm |
|
|
Nice @Yann :D
I wish we could use canvas for uploads to the arcade... same with spritefont :/ |
|
![]() |
|
Post Options
Quote Reply
Posted: 15 Dec 2011 at 10:54pm |
|
|
http://dl.dropbox.com/u/23551572/C2/trailNoCanvas.capx
Probably same idea as Ize. And I suspect it's even better than the Canvas solution fps wise. |
|
![]() |
|
Post Options
Quote Reply
Posted: 25 May 2012 at 5:08pm |
|
|
Thanks for the example Yann, it works great!
|
|
![]() |
|
Post Reply
|
Page 12> |
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |