 Sanely Insane
RisenAngel
     Manager

|
12/14/2015 | |
For a while now, I've been wondering how the rain makers in the C3 Grendel and Ettin terrariums work. When they activate, they seem to "stagger" the raindrops they make rather than drop them all at once. However, there doesn't seem to be anything in their script that would make them act this way.
Here's the code for the Grendel rain maker; I believe the Ettin rain maker is identical apart from the number of raindrops made.
**moisture monitor
new: simp 1 1 114 "blnk" 1 0 0
tick 9
**water monitor timer
scrp 1 1 114 9
lock
**WORK out how often to tick based on ET env_control
* baseline tick
setv va00 1800
* read water value from env_control
rtar 3 3 56
doif targ ne null
setv va01 ov03
else
setv va01 3
endi
targ ownr
addv va01 1
mulv va01 va01
mulv va01 50
* subtract value from baseline
subv va00 va01
* gives tick values for each env_control
* setting as follows
* 0=1750 - just under 3 minutes
* 1=1600 - 2 mins 40
* 2=1350 - 2 mins 15
* 3=1000 - 1 mins 40
* 4=1150 - just under 1 mins
tick va00
reps rand 10 1000
new: simp 2 19 2 "nornatmos" 5 21 6999
attr 192
elas 0
setv va00 rand 0 5
doif va00 eq 0
accg 0.3
elif va00 eq 1
accg 0.3
elif va00 eq 2
accg 0.4
elif va00 eq 3
accg 0.5
elif va00 eq 4
accg 0.6
else
accg 0.7
endi
mvto rand 366 2588 1505
perm rand 0 70
repe
endm |
If I can work this out, I'd like to implement something similar into my own weather generation scripts. However, all my attempts just result in all the rain being released at once unless I throw in a "wait rand X X" line.
Does anyone have a guess as to how this might work?
~ The Realm ~
Risen Angel's Creatures Blog
|