RandomFiringScriptclass | misc.t[761] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
Note that this must be used in the superclass list *before* the Script subclass:
myScript: RandomFiringScript, EventList
// ...my definitions...
;
This class is especially useful for random atmospheric events, because it allows you to make the timing of scripted events random. Rather than making a scripted event happen on every single turn, you can use this to make events happen only sporadically. It can often feel too predictable and repetitious when a random background event happens on every single turn; firing events less frequently often makes them feel more realistic.
class
RandomFiringScript : object
(none)
RandomFiringScript
object
RandomFiringScript
RandomEventList
ShuffledEventList
eventPercent | misc.t[777] |
Note that this is a probabilistic frequency. Setting this to 33 does *not* mean that we'll execute exactly every third time. Rather, it means that we'll randomly execute or not on each invocation, and averaged over a large number of invocations, we'll execute about a third of the time.
eventReduceAfter | misc.t[792] |
eventReduceTo | misc.t[793] |
checkEventOdds ( ) | misc.t[810] |
doScript ( ) | misc.t[799] |