[bug] DoOnce passes continuously?

Currently creating a spawn actor to happen from an event in the character upon death.

But for some reason the DoOnce is continuously passing the execute to the spawn actor until the actor is completely destroyed as if the DoOnce was not even there.

Heres the blueprint

Hello DJMidKnight,

I was unable to reproduce a scenario where the DoOnce does more than once. Double click on your node there to open it up and lets make sure that it looks like mine here.


yea it looks right but when I Run the level and you die it just keeps letting the exec pass.

For some reason even if I use the DoN it still runs multiple times like the BP is resetting itself over and over until actor destroyed is called.

So ive narrowed it down to that if I put the DoOnce before the function it works but in the function above it does not.

Hello DJMidKnight,

I was testing DoOnce in the EventGraph of my test blueprint earlier, but now i can see that you are using it in a Function that gets called several times.

Each time you call your function, its making a new instance of that function, not calling the same one over and over again. So it’s not really an issue of one DoOnce executing several times, but instead there are several DoOnce’s executing once.

Just to make sure, here is my test. I made a blueprint called “S”, and a function called “NewFunction”. I call NewFunction once on BeginPlay. Then inside NewFunction, I loop the DoOnce node. The PrintString only printed once!

To fix your issue, what you want to do is reorganize the flow of your blueprints so that the function only gets called once.

Hope this helps!


I guess you missed one of the comments but yes I put the doonce outside the function and that worked fine. What is weird is the function is not being called but once on death and I have used this method in other similar functions without issue.