E
Edwin
Guest
Hey, pals.
I made a simple randomizing script with exception value, like if you want to get random value BUT, for example, without 100 or any value else.
How I can perform it, please help!
I made a simple randomizing script with exception value, like if you want to get random value BUT, for example, without 100 or any value else.
Code:
/// irandom_exc(x, exc)
// Arguments
var max_value = argument[0];
var exception = argument[1];
// Choose random value
var value = irandom(max_value);
/*
Here's the problem. I want to check if value equals to exception and if it DOES,
I want to make it restart the script so it can randomize it again
*/
if (value == exception) {
// RESTART THE SCRIPT
} else {
return value;
}