How to make particles appear and fall when clicking a sprite

Hello all, so I have been trying to figure out how to make gray particles appear when I left click a sprite. I have messed with the Particles object quite a bit but it just seems to never really work the way I want it to. This is pretty much a follow up from the previous post that I have made ([url]How to make animation change after each click on a sprite - #12 by Lizard-13]).

I made it so the sprite will change to the next frame in the animation after each time it is left clicked. So if I even do add a particles object to it I have to click to make the particles appear from it, and if I hold down the mouse left click button it constantly keeps going. I don’t want it to do this, I just want to make it so when I click the sprite then gray particles appear and fall a decent speed and fall smoothly and when the left mouse button is held down and to simply show nothing/constantly be going.

So, would this be possible to do? If so, do you guys know how I could do this?

Thanks for taking the time to read this post, all help is greatly appreciated. :slight_smile:

Personally I don’t have any experience with particle system of GameDevelop but since I can’t find any option to nicely start-stop particles,
what I would do, is to crate particles at specified location at the beginning and hide particles by default, show particles on mouse click, and hide particles again if mouse released. To make sure particles disappear after few sec even if left mouse button is held, need to use a timer to hide particles after few sec. You can also create and destroy particles instead hide and show if you want.

Example:
drive.google.com/file/d/0B1sXiY … sp=sharing

Would be a lot nicer to be able to start and stop particles, but I can’t find any option to do so :confused:
But, if there is an option you can use this logic to start-stop particles instead show-hide or create-destroy.

You can start/stop particle by changing the flow (If I remember correctly) of the emitter. (Set it to 0 to stop emitting particles)
It will be muuuuch more nicer than hiding the emitter :smiley:

Great! Thanks :smiling_imp:
Updated my example so it start\stop particle instead show and hide:
drive.google.com/file/d/0B1sXiY … sp=sharing

A side not: after changed flow to 0, need to recreate emitter otherwise it didn’t start again.
So I decided to create emitter on mouse click, stop emitter after few sec and delete emitter if particles does not emit any longer, to make sure emitter does not created multiple times on every mouse click.

1 Like

Thank you guys for helping me, this is exactly what I needed. :slight_smile: