Intermittent Branch with timer

Hey folk!

So here’s what I’m trying to achieve. I have a gun that shoots a projectile, and it has a delay node in the blueprint so that it shoots say 5 times a second. Now layered on top of that, I’d like a way to have it shoot all the projectiles it can for 1 second (which in this case would be 5), then don’t shoot anything for 1 second, then shoot all the projectiles it can for 1 second, and pattern repeat.

To achieve this, I don’t think I can use a second delay node, since I don’t want to wait before spawning the projectiles, I want it to just not spawn any projectiles for 1 second every 1 second (when I put in a second delay, it “catches up” by super quickly spawning the projectiles it was waiting to spawn, rather than not spawning them at all).

This leads me to believe I need some sort of timer (possible the time in the game?) that I hook up to a branch, basically, have the branch function for 1 second, then don’t function for 1 second. What would be the best way to achieve this? Is there some sort of “true / False” condition I can hook up to a branch that toggles on and off every x number of seconds?

  • Neil