Download

Spawn Only One Actor Per Delayed Tick

I’m trying to spawn an actor from a range of target points from an array. The problem I’m having is that I only want to spawn one actor every time the Event Tick fires (which I’ve set a delay to). Currently it spawn in 2+ actors each time. Anyone know what I could do?
Any help is much appreciated!

So what did you do? Show some pictures of what you did.
What do you mean with you set a delay to your Event Tick? Hopefully not a Delay node because you can just set the tick rate in your blueprint.

acacf52036b31f0a740c1c2de8bf70a581568777.png

The event tick is just off to the side connected to the delay node. I’m fairly new so I’m probably missing certain things! Thanks.

A for each loop will fire once for each item in the array. Since your array has two items in it, it will fire twice each time it is executed.

I’ve tried setting it with just one item in the array but then it spawns two actors at the single location. Rather than one at each of the two locations.

Event Tick is suppose to fire every frame OR the rate that you defined in the settings of your blueprint, so set a value that you want or take something else.
But your problem is the ForEachLoop, its doing it 2 times every tick (because its doing something for every array element).

Edit:

Just disconnect the for each loop and connect to the spawn function (or the next for what ever you do).
Your array is fine just the loop isnt what you want.

That’s done it! Thank you very much.