The Dink Network

Reply to Storing a random sequence

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
December 10th 2008, 04:59 PM
dinkdead.gif
Not sure how to explain what I'm doing...

Say I make a sequence of numbers, something like this (but 6 rather than 3):

//&a, b, c are globals storing sprite numbers
loop:
int &temp = random(3, 1);
if (&temp == 1)
{
&temp = &a;
goto skip;
}
if (&temp == 2)
{
&temp = &b;
goto skip;
}
if (&temp == 3)
{
&temp = &c;
}
skip:
//do something
//also some counter to only loop x number of times
goto loop;

And now in another script I want to find out in which order 'do something' happened to each sprite. I thought of using sp_gold to store a simple number for the order but that won't work because what happens if one sprite is used more than once? So supervars or something might be the way to go but as you might remember I'm not much good at those and anyway I can't figure out what I'd store that would make sense.

Help?