• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Number series random it w/o index?

Status
Not open for further replies.
Level 15
Joined
Nov 30, 2007
Messages
1,202
Setting them into an array is by far the best option (at least the best one I can think of :D).


That means this right here.
No loops.

My brain is not working!


constantRandom

XValueX + 1000Value

Cur0000min

1111

2222

3333

4434max


GetRandomInt(1000,1000+4) => We recived lets say 3.


constantRandom

XValueX + 1000Value

Cur0000min

1111

2222

3334max

44--


I'm confused because sometimes I get values from the constant side then we must change the right side so not to mess it up... :>

The constant side takes out values from min to max in order. The none-constant side takes them out randomly. I want to be able to switch between these two performances without interfering with the constants.

if we get a number from the constant side after the second table I want this to happen...

constantRandom

XValueX + 1000Value

0-0-

Cur1111min

2222

3334max

44--


But If I random them long enough the order will get messed up? Perhaps I need to intrudce something pointing from the left side to right aswell, since the right side points at a value outside. I wonder who is more confused now, you or me? :D
 
Level 15
Joined
Nov 30, 2007
Messages
1,202
Wait, do you mean that you need a list of integers where you can only pick each integer once?
And the order must absolutely be maintained in that list?

You're confusing me with those tables :p.

Fell asleep! ;P

They are connected, if I take out cur from the left side, the right sides matching must also be reoved. The right side must random all the avalible. The left only display the lowoest availble. They show the same thing but are stored at diferent positions?

So the left sides order must be maintained, the right side should correct itself or something,
dunno.. I'm confused aswell! ;P

Edit: Okay, lets rephrase everything..!

I got some data to retrive, they are stored in arrays. But I have two ways to get them 1 random and one following a increasing loop.

Once the data is retrived, it shall be removed from both these two ways to retrive the same information...

Method one

for loop i, 0 to max
print information

Other way for loop 0 to max
random...
decrease pool

what I want is to be able to swap between those at will and removing the information from both without losing the order of the first setup.
 
Last edited:
Status
Not open for further replies.
Top