I’d like a timer to call a function (not an event, contrary to this blueprint) in code based on a couple of parameters, at a set interval. I’m actually trying to implement this in C++ but it’s giving me a headache, so I thought I’d try Blueprint first. The following code in Blueprint is giving me an infinite loop error? I know the timer is calling itself at the start of the loop, but it’s based on an IF statement that can change, so surely this is broken? How am I supposed to correctly do the following?
The idea is that I want a function to instantly call the ‘SpawnActor’ function when the fire button is pressed, then repeat this at a given interval until we’ve spawned the correct amount of them. NOT using a delay because they’re not available to me in C++.