[General] Random number skip

Status
Not open for further replies.

sentrywiz

S

sentrywiz

I have a conundrum with loops. I want a loop that doesn't include number of loops but rather until condition is met.
And I don't know if the call exitwhentrue script will only end the loop not the whole trigger.

Here is what I want done:

I need a random number generating that will skip numbers that are in the conditions. Something like:

Generate number 1 - 10 where number cannot be 3 or 8.

The loop would only need X number of tries out of infinite to get that number and then break itself.
 
Set integer_var = random number between 1 to 10.
If -
Or-
integer_var = 3
integer_var = 8
Then -
Run this trigger (checking conditions)
Else -
something else

This is very simple and will be redundant if the numbers your want to leave out differs through the game.


That's interesting, I didn't think out of an entire trigger as a complex loop. Thanks that clears a point. +rep
 
Status
Not open for further replies.
Back
Top