Is there a way to have multiple items spawn according to a percentage of spawn chance?

So I have multiple items (10+) that I want to spawn randomly but with weights. I’ve done this before using a Macro and a bunch of “Random Bool” nodes but looking back it at, it looks all messy now.
Is there a better way of having items spawn with weights? Aka percentage of spawning chance?
Thank you!

that’s the only way i can think of

try posting a screenshot and maybe we can help you clean it up

the only other way would be to use the random node, but this wouldnt have weight:

You need to store the spawn likelihood within the parent class. You can set it individually for each child class, and then you can pick it up with

Thank you! I’ll try to implement this.
Here is the messy macro I had for comparison, it worked but I felt it was a bit too crowded.
image


No no no… :slight_smile:

You have a parent class for pickups, right? Just put a probability float in that, and you can set it on each of the child classes. Then all you need is the code I pasted.

Yes I’m working on it. Thanks!