ShuffledEventListclass | eventList.t[400] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
For the first time through the main list, we normally shuffle the strings immediately at startup, but this is optional. If shuffleFirst is set to nil, we will NOT shuffle the list the first time through - we'll run through it once in the given order, then shuffle for the next time through, then shuffle again for the next, and so on. So, if you want a specific order for the first time through, just define the list in the desired order and set shuffleFirst to nil.
You can optionally specify a separate list of one-time-only sequential strings in the property firstEvents. We'll run through these strings once. When we've exhausted them, we'll switch to the main eventList list, showing it one time through in its given order, then shuffling it and running through it again, and so on. The firstEvents list is never shuffled - it's always shown in exactly the order given.
class
ShuffledEventList : RandomFiringScript EventList
ShuffledEventList
RandomFiringScript
object
EventList
Script
object
firstEvents
shuffledList_
shuffleFirst
suppressRepeats
Inherited from RandomFiringScript
:
eventPercent
eventReduceAfter
eventReduceTo
Inherited from EventList
:
curScriptState
eventList
eventListLen
Inherited from RandomFiringScript
:
checkEventOdds
Inherited from EventList
:
advanceState
construct
doScriptEvent
scriptDone
Inherited from Script
:
getScriptState
firstEvents | eventList.t[405] |
shuffledList_ | eventList.t[510] |
shuffleFirst | eventList.t[415] |
suppressRepeats | eventList.t[430] |
You might want to set this to nil for lists of three or four elements, since such short lists can result in fairly un-random-looking sequences when repeats are suppressed, because the available number of permutations drops significantly.
doScript ( ) OVERRIDDEN | eventList.t[433] |
getNextRandom ( ) | eventList.t[490] |