There's many sources of error if you're not doing it properly. The first thing I would do is get rid of any waits. You shouldn't need them. The second thing I would do is set a switch when the countdown timer is 0 and then set the countdown timer back to 10 minutes in the same trigger. Then, any trigger relating to the randomization will have the condition that the switch be set. When you create a unit based on the death counter result, clear the switch and that will stop any more randomization occurring.
Also keep in mind that since you only have 30 options and you're using a death counter method for randomization, you'll need to rerandomize certain outcomes. For example, in your situation your randomization outcomes range from the 0 to 31. That's 32 outcomes, 2 more than you need. What you will need to do is for 2 of the outcomes have it run the randomization again so that you generate a different random number.
Here's how the triggers would basically look.
When countdown timer is 0, set switch "Start randomization" and set countdown timer to 600 seconds.
When switch "Start randomization" is set:
- set DC to 0
- Randomize switch "random"
- if "random" is set, add 1 to DC
- Randomize switch "random"
- if "random" is set, add 2 to DC
- Randomize switch "random"
- if "random" is set, add 4 to DC
- Randomize switch "random"
- if "random" is set, add 8 to DC
- Randomize switch "random"
- if "random" is set, add 16 to DC
- if DC = X with X being a number from 0 to 29, create the corresponding unit and clear switch "Start randomization"
Each bullet is it's own trigger (or in the case of the last one 30 separate triggers) with the condition that "Start randomization" is set.
This will automatically rerandomize for the outcomes 30 and 31 because the last bullet will never be satisfied, therefore not clearing "start randomization".
The above method uses one switch randomized 5 times. Alternatively, you can randomize 5 switches once.
It would look like
- Randomize switches "r1", "r2", "r3", "r4", "r5"
- if "r1" is set, add 1 to DC
- if "r2" is set, add 2 to DC
- if "r3" is set, add 4 to DC
- if "r4" is set, add 8 to DC
- if "r5" is set, add 16 to DC
Post has been edited 1 time(s), last time on Jul 29 2009, 1:37 am by Pariah.
None.