GameSalad

Random Number - No Repeats

Hey Saladers,

I'm designing a party game and I'm stuck trying to figure out how to get the mechanics straightened out.

I have an index attribute that is randomly assigned to produce a number between 1-90 when the "next card" actor is pressed. When that attribute produces a number, my actor "game card" spawns the particular card associated to that number. My problem is getting the numbers to not repeat at all. In a way, I am simulating a card game where you would work through the deck and discard used cards. I tried to create a boolean for each card that would be set to false when the random number came up. I have three attributes that are working together to produce an outcome, but I can't figure out how to get them to talk. IE: next actor randomly produces the number 3, but number 3 is false, then loop.

Please help. I can't get off the struggle bus.

Comments

Sign In or Register to comment.