Particles Pictures

0 favourites
  • 10 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • Hello,

    I'm using the construct for the second day xD

    And I have a small question, i'd like to create a debris effect, so I did 3 debris pictures and I'd like to use them in my sprite emiter, but, how can I use more than one picture?? :-/

    All the best,

    Alexandre

  • Put all the debris images in a single particle's animation and then ...

    On created : DebrisEmiter Set Frame to random(1,numofdebrisimages(0-based))

    Cheers ...

  • Thanks for the reply :)

    But, how I set the particle animation? I use the sprite object?

    I just can set one frame :(

  • I made it work hacking the original particle script, but only when webgl is disabled, if someone know how can I set the texture for drawgl I'll be very happy ^^

    I'll post here the component for download when working :D

  • Create three particle objects with different images, then overlay them on top of each other. You should never modify the scripts directly, since your changes will be reversed on updates and it will make your projects incompatible with everyone else's copy of Construct 2.

  • Particles are optimized slightly to make them better than spawning multiple sprites. But not by much, if particles had the extra abilities it would become better to use sprites. So they will probably say use a sprite instead.

    I have used multiple overlapping particle emitters in the past, each spewing it's own image. (IE sparks, smoke, and fire.) That may be an option.

    Ashley beat me to it. ;-)

  • Thanks for the idea, I did this, but is very annoying to configure :(

    And don't worry about compatibility issues, I made a copy, so now I have the original particle and a hacked version as different components :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You should also note one of the reasons the particles object is fast is because things like the single-image limitation and no rotation means it's possible to use a special heavily optimised renderer. If you hack the Particles object to swap texture, it will perform worse than using three unmodified particles objects overlaid.

  • yes I know that, and sure I know my code isn't optimised yet xD

    but I really not sure if this kind of modification can do big performance problem...

    The idea is not swaping the texture, the true is, my code isn't very different from the original particle, the difference is, now you can set a sprite sheet and when I create the particle I set the texture frame on it... sure I'll not use it in something with a lot of particle, but for small one shot particles like debris, sparks it can work very nice...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)