How to randomly spawn 200 actors inside navmesh bounds?(using blueprint)

Hey folks,

I need a way to randomly spawn a “pick up” actor within my navmesh bounds.
I need it to be easily adjustable for the amount spawned. So I refuse to use an array.
Pressing duplicate for X arrays containing 200+ duplicates of the same actor would be a full time job.
I have managed to spawn inside the navmesh bounds but there’s no random factor to it, it’s either the center or 0,0,0
Placing 1k targets to simulate random is also a waste of time.

Any help would be greatly appreciated.

try using “random point in bounding box”

if you want them to spawn on the floor tho make sure you adjust the resulting Z value or they will have a chance to spawn in the air

CNKIT is right, but you can go one step further towards automating the process. Create a simple blueprint with only a box collision, and use this BP to spawn your actors. There is a “get actor bounds” node and you can use this to feed the “random point in bounding box” node. From there, just drag it into your level and edit the box in 3d space. You can even create different instances of this spawner all around your level.

For bonus ease of use, you can also turn collision for the object off (or set it to ignore) and it won’t effect anything in your level.

Thanks for the info.
I’m going to check that out soon.

For now 's the random spawn point I came up with after getting some fresh air :stuck_out_tongue:
Was scared converting the “Random int” to a “float” would return 1, since “random float” only has two options 0and 1.

The actor list node is a self made variable.
Variable type -Actor.
Default Value contains 50+1(0-50) instances of the “pick up” actor.
Blueprint is running in the Level blueprint, which makes it redundant since it’s not reusable.

You could also do a plain “forloop” which takes a starting int and a max index (so 0-50 in this case) and does the same thing as your foreach loop does. Anyhow, it doesn’t really matter but I hope you can get it working!

XD thanks for that piece of info.