random array and remove

Hi,
i am working on a spawn project.
What I’m trying to achieve:
a: Array of spawning Objects
b: Array of spawn Targets
A Loop through “a” getting a “b” location and then delete “b” so no second Object is placed there.

I do my research here and found some similiar Questions, but none helped me.
Here my BP which seems not to delete.

It’s the pure node evaluation. I feel like I answer one of these per day:

The script you posted generates 3 different randoms per loop interaction. Use the int to fetch the desired element from the array. Do not regenerate the random.


But, honestly, it’s easier (and faster) to Shuffle the array and then loop. No need to remove anything since there can be no duplicates this way.

Thank you so much. Didn’t expect that both Nodes generate Different Values, i thought both synced and i get just the Index of the Object.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.