Spawn Emitter (Help please)

So, I wanted to make a emitter spawn on key press. And i was sure i knew how to do it. So i made a new Blueprint Actor and i made a graph inside of it. But it is not working, Can someone tell me what i did wrong please? Also i need it to destroy after 3 seconds.

if this is your pawn, and if the actor is first person, you are not going to see any spark.
instead, try do like in Epic’s blueprint tutorials, first get a location that is fixed(ie just input some number that was above ground and near your PlayerStart), and then find a way to get/generate location that you want.
second, when you spawn emitter, if you checked auto destroy, that means they only emit once and then self destruct, and if you want to destroy emitter you need to connect “return value” from spawn node to destroy node’s “target” input, otherwise it will try to destroy whatever this current Blueprint’s instance(which is “self”).

I’m not sure what you mean, This pawn im using is the first person template but i deleted the skeletal mesh. And i have all of this located in its own blueprint event graph.
Also the particle demo is just particles placed in the world i don’t remember a part where you spawned one on a key press.

see, let me say this in a more comprehensive way.
you are a pawn, you hit a key, you spawn a spark at location of your pawn, but your controlled FP camera isn’t viewing the “location” where the foot usually steps on. That’s why I suggest you spawn to a different location first.

second, in a blueprint, “self” means any instance that use this blueprint to create as its class definition.
If you destroy actor, and target is “self”, you are trying to kill the pawn, not the particle emitter you just spawned.

third, if you set spawn particle to auto destroy, means it will only play once, which could be really short, and your delay will do nothing.

Ok i understand that a bit more now. Do you know if there is a way to use your cursor position for the location?

I managed to get it to spawn on my character, but i cannot figure out how to get it to spawn where the mouse cursor is pointing. Is there anyone that knows how to get the location of the mouse and use it to spawn a emitter?

I see possible bugs:

  • you spawning emmiter in some strange place because you calculated wrong location
  • your emmiter has very short life, to check this migrate emmiter from epics examples and try spawning that
  • your event press 1 never fires. Click on that event node and add breakpoint, (F9) now when you press 1 game should stop and show you that event node, if it does not this BP never receives input.

PS. i am betting on 3rd case.

To get location of mouse click, start new project from top down there is working BP for mouse clicking.

The emitter works fine im just trying to spawn it where my mouse is. Also this is a first person project im trying to spawn the emitter at the location my reticle is looking at

try trace from your view point and then emit particle along the path at distance you desired.
trace will return a hit location, and you can then decide from start to hit, where in the middle you want to emit particles.

I cannot find trace from view point anywhere