Hey there @Skyboy! So if I understand correctly, you’d just like some basic weighted random rolls for a weather system? Would you be able to make a function that rolls once instead of repeated branches
I’d recommend taking a look at these two weighted random implementations, they might give you some inspiration:
Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.
The probability functions in the vids linked by support are the best way to deal with random unknowns. But since potential weather types probably won’t change often, a quick way to fake it might be to add multiple versions of each event in the array to approximate probability. Then just generate one random int in range with max being the length, and use the result as an index.