Spawning items between 3 actors over time - Help and where to start?

I’ve hit a bit of a snag in my project. I want to make an item box that spawns a random item once between 3 actors. Right now I have a blueprint set up on an actor (BP_ToySpawner) to spawn 1 of 4 actors on begin play. I want to change this to spawn one of the actors between 1 of 3 spawn locations every minute. However, I’m not sure how to go about or get started with this. I have the 3 spawn locations set as empty actors in my level. Any help is appreciated. I’ll have an image of my BP_ToySpawner blueprint below.

Hey @BossNelNel! Welcome to the forums!

So you already kind of have the idea with your switcher there!

Just set the 3 locations as SpawnVector1,2 and 3 and use a switcher, then after spawn use “SetActorLocation” using that output!

As far as the once per minute, you’ll want to run this code on a Set Timer By Event. You’ll put that Set Timer By Event after a “Do Once” node so you don’t end up running the timer multiple times… otherwise you get 2/min, 3/min, 4/min and so on. You’ll want to make a custom event that will also go into “Set Child Actor Class” (just like BeginPlay) then bind that to the Set Timer by Event! :slight_smile:

1 Like

Thank you so much! I set the spawn locations as vectors and attached them to a swither as you suggested. The random spawn locations work perfectly!
I’m having a little trouble understanding how the custom event works though. In the new blueprint, I have the custom event node going into the “Set Actor Location” node. Since I have that going into “Set Child Actor Class” As of now every time a new item spawns the item gets removed. Would I need to attach the bound custom event node to the “Set Child Actor Class” instead of “set Actor Location”?

Again, thank you so much for your help. I really appreciate it! :slight_smile: