Particles spawn on click

Hello, I’m new to Unreal 4 and i am loving it so far. but there is one thing that I cannot seem to figure out. I am messing around with the default Top Down blueprint project and i cannot figure out how to add a particle system to where you click to move the character. I have done everything i could think of and i even searched for a while for tutorials and have not found anything specific to this. If anyone knows how to do this would you please share your wisdom?

Also i just noticed that when i play with two clients nothing works i right click on one of the clients and they do not move the character but i can clearly see them both so if you have anything to help that that thanks also!

Multiplayer is harder to setup, make sure you check Epic’s tutorial and then check this thread: Come Learn Blueprint Multiplayer with me! (aka Tom's a Glutton for Punishment) - Blueprint Visual Scripting - Unreal Engine Forums
Me and Tom both provides a example project that works for dedicated server situation.

For spawn particles, check Content Example, and open Input Example, there is a UFO at the end of rooms that have spawn particle on collision.
you can just copy that and wired to your input event.(probably need some tweaking on events as you need to let GameMode(server) do it if you want it to properly done and show up for multiplayer.

Ok i looked up that blueprint and i thought i had figured it out but i still can’t get it to work i guess im just not used to blueprint yet can someone point me in the right directions.?

This is still not solved :confused:

You can actually add this with a single node. :slight_smile:

Dig into the MyController Blueprint on that Template. You’ll see a Function called MoveToHitLocation. Open that up.

Inside, you’ll see that we’re grabbing the location the mouse just clicked and using that as the target for the Pawn’s movement. That means all the hard work was already done for you. The last node in the chain is “Simple Move to Location.” Right after that, add a Spawn Emitter At Location node. Feed it the Location from the Break Hit Result that sits a bit earlier in the graph. Set that to any particle effect you like. Now, when you click, you’ll get particles and your Pawn will run toward them.

Thank you it worked! But i ran into some problems.

  1. When i right click the emitter does not go away so i added a auto destroy on finish hoping that would fix it but it didn’t so im not sure what to do.

  2. Also how can i make it so it does not spam the emitter if i spam click?

Im sorry i feel like a newb :confused:

Another thing is do you know anything i can do for the part where the player cannot be controlled when running 2 clients?

Thanks!

Ok i have been trying to get this to work since my last post with alot of trial and error and no results. I have tryed messing with the ufo demo with no luck. does anyone know whats happening here? Its driving me insane.

In response to you having issues with the spawn particle system on click…

What are you trying to do? ( I’m asking so I can answer your question in the right way )

If you are attempting to create a projectile and have it move to a location, or are you attempting to spawn fire(as an example) at a given location?

Im trying to make it so when you click to move you character it adds a emitter at the location that you clicked and once you reach that location it emitter will be taken away. (such as in league of legends)

Edit: I have everything setup but i cannot get the emitter to despawn once i reach the location it gets placed in and also im not sure how to set it so that only one can be placed at a time to avoid spamming the emitter around the map.

Has anyone ever done this or know how to fix it?

This issue still has not been fixed.

Hello,

Whether or not the emitter gets destroyed depends on how you created it,
basically, in Cascade:

  1. Select your emitter(s) and click on the Required Module
  2. Set the Emitter Loops to 1 to prevent it from continuously looping ( 0 = infinite, which is the default value )

Alternatively, you can destroy it manually after a set delay, like so:

http://imageupper.com/s02/1/4/X1398575565647481_1.png

You mentioned that you wish to prevent the emitter from “spamming everywhere”,
what I guess is happening is that you spawn your emitter each Tick while your mouse button is held down.
In your blueprint, make sure to spawn the emitter after your button press event and not the **tick **event ( which is right next to the tick event in the MyController blueprint ).

My Emitter is inside my move to Hit Location node so i am not able to add a delay.

And i lowered the lifetime of the actuall particle but it is still not despawning until like 2minutes after it is placed.

The Hit Location node gets called every tick while the mouse button is pressed,
unless that is your desired effect remove your current implementation and use this instead:

As for automatically destroying the emitter,
open up your particle system in cascade and follow these steps:

Hope that solves the issue :slight_smile:

Thank you! That fixed it