Target point actor spawn.

Hello. :slight_smile:

I’m working on a game and there are these target points. In my project I have 5 Target Points where I would like to spawn the Actors down, so that two Actors don’t spawn on each other.
How can I solve this?

Thank you for your answers! :slight_smile:

Hi Edem,

You could do something like this - have a target spawner that spawns the target and then destroys itself - so the target it spawns would remain, but the target spawner itself would be destroyed.

This is just a sample for what I do for my item spawns - I’m registering them to my Game Mode because when the game starts, my Game Mode iterates through all of my BP_ItemSpawner’s and calls the **SpawnItem **event which does the actual spawning of an item and then it (BP_ItemSpawner) destroys itself.

The **BP_ItemSpawner **has a single Billboard component as the root component and it’s just an arrow to show me where the BP_ItemSpawner is when I place it into the world.

You can see that there’s no overlap issue. Ignore the random items and the bow that’s 1/2 way in the ground - this is still a work in progress lol… Hopefully this helps :smiley:

Thank you very much, you helped me a lot! :smiley:

You’re very welcome! :smiley:

Can you clarify how you set this up mine is not work were is the pink line coming from that it attach the get node? and do I need to make a data table to use this?

Hey terri, sorry I just saw this message now. That line is coming from GetDataTableRowNames:

In this case I was doing it in my BP_ItemSpawner which is a terrible practice.

This means that every single item spawner I have is going to go fetch every item from my data table just to pick one name and spawn that item.

A better setup would be to run this in the Game Mode or Game State and store the Row Names in an array. Your Game mode or Game State could also have a function that simply returns a random Name that your spawner could use to spawn the item.

So something like this would exist in your Game Mode or Game State:

I hope this helps! Again, sorry for the super delayed message! :sweat_smile: