Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: VascBogdan on February 14, 2015, 01:10:07 PM

Title: [SOLVED] Particle doubt
Post by: VascBogdan on February 14, 2015, 01:10:07 PM
Hello. I have an explosion particle, but I didn't find any action related to particles. My ideea was to put the explosion particle on the target root, disable it, and enable it/starts it by an action, when a state ends. In another way to say, I want my target to explode when it dies.
I would really like to use particles instead of animation, because I have like a lot of particles in my project and they are pretty nice. Is there anything I have to import ?
Title: Re: Particle doubt
Post by: VascBogdan on February 15, 2015, 07:42:13 AM
Bump
Title: Re: Particle doubt
Post by: 600 on February 15, 2015, 08:08:04 AM
Hello, check Ecosystem for Particle there are Play/Pause/Stop actions or you can use Set Property action to control them.
Title: Re: Particle doubt
Post by: VascBogdan on February 15, 2015, 09:26:28 AM
I didn't really understand the thing with Set Property, I will still wait for someone else. Maybe I'm not that right, should I transform somehow the particle into an animation ? If yes, how ?
Title: Re: Particle doubt
Post by: VascBogdan on February 16, 2015, 07:03:51 AM
So, does someone know how to create an explosion by a particle in  PlayMaker ?
Title: Re: Particle doubt
Post by: Lane on February 16, 2015, 07:33:55 AM
You could just turn on/off the GameObject instead.
Title: Re: Particle doubt
Post by: VascBogdan on February 16, 2015, 07:41:13 AM
I forgot to say. I tried this but when I drag & drop my particle prefab on the GameObject empty space, it doesn't work. It tell me to either Sent Message, either to Set Property or something like that. It works only if I put the particle prefab from a folder, but I need to put the one from the Enemy prefab (so it will explode where the enemy is).
Title: Re: Particle doubt
Post by: Lane on February 16, 2015, 07:45:32 AM
Use the Activate Game Object action.
Title: Re: Particle doubt
Post by: VascBogdan on February 16, 2015, 08:06:57 AM
This is what I used.
Title: Re: Particle doubt
Post by: Lane on February 16, 2015, 08:14:07 AM
Are you targetting a prefab from the scene or something?
Title: Re: Particle doubt
Post by: VascBogdan on February 16, 2015, 09:09:14 AM
Well, I think I solved the problem that didn't let me to put the prefab there. But now, the explosion doesn't work. Is this maybe because when the enemy dies, it will be destroyed(deleted) and the particle is a child of the enemy ? If yes, what now ?
Title: Re: Particle doubt
Post by: Lane on February 16, 2015, 09:16:03 AM
Before you destroy the character you could either use the Set Parent action to reparent the particle system to nothing or detach children in the Destroy action. You'll still have to destroy the particle system after that.
Title: Re: Particle doubt
Post by: VascBogdan on February 16, 2015, 02:31:30 PM
Thank you again. I finally made it to work with Set Parent. To the explosion prefab I added an FSM to auto-delete the explosion game object from the scene after 3.5 seconds after the target died. Thank you again.