Weather manipulation
Posted: 27 Jan 2018, 13:46
Since variables are available it's possible to change weather using something called virtual variables. Virtual variables are variables that are used by the game internally and are exposed for use in fun.
Weather in TheoTown has an internal time (in milliseconds) that is used to calculate the current weather (based on a mystic formula ). You can assign a new time for weather by writing a value into a variable called "weatherTime"
So this code sets weather time back to 0. Here more useful numbers:
To lock/unlock the weather timer, write a value of 1/0 to a variable called "weatherLocked". That's how the weather machine preserves the selected weather.
You can also read from these virtual variables.
Weather in TheoTown has an internal time (in milliseconds) that is used to calculate the current weather (based on a mystic formula ). You can assign a new time for weather by writing a value into a variable called "weatherTime"
Code: Select all
"on click fun":[
{"actions":[{"type":"set","id":"weatherTime","code":"0"}]}
]
- Sunny: 290373
- Rain: 849711
- Lightning: 622697
To lock/unlock the weather timer, write a value of 1/0 to a variable called "weatherLocked". That's how the weather machine preserves the selected weather.
You can also read from these virtual variables.