Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: nabilfx on September 13, 2015, 07:11:22 PM

Title: Particles play once
Post by: nabilfx on September 13, 2015, 07:11:22 PM
im using PlayMaker Unity UI Proxy, 

how can I do to play the particles one time, at the touch of button, and then only return to play if i tap another button, destroy them, and then come back to play at the touch of another button.

Because the particles are creating copies when I touch the same button.
Title: Re: Particles play once
Post by: jeanfabre on September 14, 2015, 03:22:53 AM
Hi,

 it's not the particles that creates copy, it's your logic, so in your logic you need to maintain a flag or check if you have already created an instance of your prefab and simply reuse it if already created, else create it.


 Bye,

 Jean
Title: Re: Particles play once
Post by: nabilfx on September 14, 2015, 09:24:17 AM
its creating clones copy, i need to play once.
Title: Re: Particles play once
Post by: jeanfabre on September 15, 2015, 01:28:23 AM
Hi,

 then, don't create copies, and add that prefab during editing, and for example have an Fsm on it that you send an event to, like "FIRE PARTICLES" or something, and that fsm will play the particle system.

The "play once" feature of a particle system is to be setup on the particle component itself, by uncheking "Looping".

Bye,

 Jean