- Joined
- Mar 12, 2005
- Messages
- 117
Hi all. As always i hope everyone is well and enjoying there weekend . My question is does anyone know how to make a random integer loop (the trigger will explain more)
my trigger is
Event: every 10 sec(timer is set for test purposes)
Action: For each (integer A) from 1 to 1, do actions
sub Action:Set Weather = (Random Integer number between 1 and 10)
wait 1 sec
2ndsub Action:Set Weather = (Random Integer number between 1 and 10)
(this sets up the integer)
Then my different types of weather
Event: every 10 secs
Action: if weather=1 then:turn off last effect, wait 1 sec create rain, wait 0.10 turn on last created weather effect
if weather=6 then:turn off last effect, wait 1 sec create fog, wait 0.10 turn on last created weather effect
if weather=8 then:turn off last effect, wait 1 sec create wind, wait 0.10 turn on last created weather effect
if weather=10 then:turn off last effect.
again for testing i changed the rain wind and fog to equal 1,2 and 3 (the integer values). and made the random integer number 1 to 3 that worked perfectly so i changed the numbers to those above (Matching the trigger above) and now all it does is rain or not rain, then it stops and only either rains or not rain. how do i keep the loop going and how do i get the different weather cos all the random loop picks is 1 and 10. :?
my trigger is
Event: every 10 sec(timer is set for test purposes)
Action: For each (integer A) from 1 to 1, do actions
sub Action:Set Weather = (Random Integer number between 1 and 10)
wait 1 sec
2ndsub Action:Set Weather = (Random Integer number between 1 and 10)
(this sets up the integer)
Then my different types of weather
Event: every 10 secs
Action: if weather=1 then:turn off last effect, wait 1 sec create rain, wait 0.10 turn on last created weather effect
if weather=6 then:turn off last effect, wait 1 sec create fog, wait 0.10 turn on last created weather effect
if weather=8 then:turn off last effect, wait 1 sec create wind, wait 0.10 turn on last created weather effect
if weather=10 then:turn off last effect.
again for testing i changed the rain wind and fog to equal 1,2 and 3 (the integer values). and made the random integer number 1 to 3 that worked perfectly so i changed the numbers to those above (Matching the trigger above) and now all it does is rain or not rain, then it stops and only either rains or not rain. how do i keep the loop going and how do i get the different weather cos all the random loop picks is 1 and 10. :?