playMaker

Author Topic: Particles play once  (Read 2029 times)

nabilfx

  • Full Member
  • ***
  • Posts: 186
Particles play once
« 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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Particles play once
« Reply #1 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

nabilfx

  • Full Member
  • ***
  • Posts: 186
Re: Particles play once
« Reply #2 on: September 14, 2015, 09:24:17 AM »
its creating clones copy, i need to play once.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Particles play once
« Reply #3 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