Code: Select all
script 56 (void)
{
//random numbers
int newRand = Random(0, 17);
int lastRand = newRand;
for(int i = 0; i<=17; i++)
{
//ensure the new random number isn't the same as the last
while(newRand == lastRand)
{
newRand = Random(0, 17);
}
lastRand = newRand;
Thing_SpawnFacing(1, randomweapon[newRand], 1, 994);
delay(4);
Thing_Remove(994);
}
//change the random number one last time
while(newRand == lastRand)
{
newRand = Random(0, 17);
}
//show, remove, then spawn the randomly selected weapon
Thing_SpawnFacing(1, randomweapon[newRand], 1, 994);
delay(35);
Thing_Remove(994);
Thing_SpawnFacing(13, randomweapon[newRand], 0, 994);
boxActive = 0;//box no longer in progress
acs_execute(70 ,0 ,0, 0, 0);
}


