Random Object spawning

Hey guys so basically there objects i wish to randomly spawn around the map once by using a teleport and a target system. As you can see the the image i have attached below that is my spawn system however sometimes one one is teleported to the target and the rest aren’t. Two have manged to be teleported also but there’s always at least one that wont. I have already made sure the objects are movable. Any help would be greatly appreciated!

You could simplify this by a lot by using arrays. Simply have arrays of target points and use and random int to select one.

Ooh ok thanks for the reply! Is there any way you could possibly have a image of what you mean? I am kinda new to unreal engine. :slight_smile:

Hi man , there are more than one way to do it so, here an example.

I shatter across the map my target point.
I use the node , get all actor from class, to have the full list.
i pick up one of them , randomly, using the length as max range .
i get his location and teleport something there.

Don’t forget to take length - 1. And it would be good to take this, but make 3 arrays manually seeing as how each item has its own group of target points. Array 1 cold be sparkplug target, 2 would be wheel target…

Here is a page to help you with arrays. Working with Arrays | Unreal Engine Documentation (to the OP that is)

Awesome sauce! Thanks very much bud!