DoOnce matters on a function seems that it can be repeated

Sorry about the poor English, I’m trying my best.
I’ve written a BP that generates monsters keep attacking the player. I ran in to an issue when I set up several generators executing the same marco. First of all, inside my BP, I set up my levels with a bunch of macros that contains “Make struct” and “Set array elem”.

Then I set up all the generator’s timer to 3 sec, just for testing.

This is the monster spawning macro, and where the main problem is. In this case, everything works properly.It spawns 4 rabbits after 3 seconds.

But if I compile this without using DoOnce, It turns out that the generators spawn 0~4 rabbits every 3 seconds.But the counting is correct. I’m wondering why? Repeat confirming which wave it is, and which monster to spawn every time the generator fires doesn’t matter anything, I guess.

Hello daniels11,

It seems this may be related to the way the DoOnce Multiinput node works. Remember that, unless it is reset, it will only do A OR B before locking up and not executing anything else, so it’s not doing both of those. I would suggest running this in the viewport while watching the event graph to try to see where the executions are happening so you can get an idea of what nodes are getting executed and in what order. Setting some breakpoints may be able to help as well.

I think I got it, I’ve misunderstood the DoOnce Multiinput node.( I thought It will execute “A and B” before locking up ) I checked out my BP carefully then figured out what’s wrong with it. Thanks for the help, Now my generator is working good!