Help with BP! Atribute 4 numbers randomly but not so randomly. XD

Hey. i can’t really explain it in the tile but here it goes.
i need to attribute a random number between 1 - 4 to these Int’s
BUT and here’s what’s bugging me. they can’t be repeated… so if PU Dirt [INT] get’s 1, PU [STONE] cannot get stone as well. and if PU GOLD get’s 3 the others can’t get 3.
any easy way to do this?

Messy but works

Here’s one way:
You could have an integer array with 4 entries (1,2,3 and 4), then shuffle that array, and then assign your variables the shuffled values from the array.

Hah, didn’t realise someone else would also post a solution a minute before me!

Well, I guess you’re spoiled for choice now. :smiley:

I would go with Zero, seem far simpler than mine :slight_smile:

What about you make int array of: 0,1,2,3
Then you get random number that from 0 to " valid index)
Read value inside, its your new random value for item
Then you remove item with that rolled index.
Repeat until array is empty.

Basically emulate blind orphan girl with basket scenarion.