Random number generator

Ask any questions you may have here.

Random number generator

Postby enriched » 11 January 2019, 21:34

How do I stop a random number from the random number variable from duplicating, all I want is a random sequence from 0-7; an example is 5,4,6,2,1,3,7 however with this random number generator I would get a repeated integer from the sequence say like 5,5,6,2,1,3,7 when in fact 4 is missing and I don't want it to be missing. I hope I've explained my question in details if not just tell me to elaborate. Thanks



TOPIC LOCKED darkstar helped me
Last edited by enriched on 12 January 2019, 01:03, edited 1 time in total.
User avatar
enriched
Recruit
 
Posts: 16
Joined: 18 August 2017, 16:07

Re: Random number generator

Postby darkstar 1 » 11 January 2019, 23:04

You could store each value in another 7 variables and check if each random number equals one of those
http://www.plazmaburst2.com/?s=2&map=darkstar%201-pixels
User avatar
darkstar 1
Lite Marine [800]
 
Posts: 848
Joined: 13 September 2014, 13:20
Location: Here... or there :|

Re: Random number generator

Postby enriched » 11 January 2019, 23:55

What do you mean by "equal" and "those"?
User avatar
enriched
Recruit
 
Posts: 16
Joined: 18 August 2017, 16:07

Re: Random number generator

Postby darkstar 1 » 12 January 2019, 00:29



and the extra variables
http://www.plazmaburst2.com/?s=2&map=darkstar%201-pixels
User avatar
darkstar 1
Lite Marine [800]
 
Posts: 848
Joined: 13 September 2014, 13:20
Location: Here... or there :|

Re: Random number generator

Postby enriched » 12 January 2019, 01:02

I think I know what to do... and TBH everytime I tried to create variables after watching all of Max Teabag's YT variable tutorial videos, I would fail. Thanks for your help
User avatar
enriched
Recruit
 
Posts: 16
Joined: 18 August 2017, 16:07


Return to Questions

Who is online

Users browsing this forum: No registered users