2
\$\begingroup\$

Hello everyone reading this,

I've used the particle editor to edit an effect to put in my game. Is it possible to have multiple and randomly emitted images (particles) instead of one?

I don't want to create for example 3 particle effects in the same position for having the result I want.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

I wanted to achieve something very similar to this. My goal was to have a particle explosion that would choose from a number of random sprites when spawning the particles.

Unfortunately this does not appear to be possible with libGDX. The particle editor appears to be designed to use multiple emitters in order to layer different effects or sprites on top of each other.

A solution to your specific problem (and the solution that I am using for mine) is to create the particle effect that you want, and then duplicate it for each different image that you want to use. You will need to adjust the count lower in order to account for the additional emitters. Then, go into each emitter and change the image to the one that you want. The preview window will show a combination of all the emitters that are active.

You can then save the filename.p and use it with libGDX. If you open it up, you will see each emitter in the file, separated by two lines. If you have the images in a different directory than the assets directory, or if you are going to use a texture atlas for the emitter anyway, you may need to change the name of the Image Path of each one to remove the full path and leave only the image name.

Here's a screenshot of one of the finished particle effects:

enter image description here

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .