Skip to content

Weather Sense

Is it raining, snowing or storming right now — a binary answer and nothing beyond it

tick 0
Jump -> 30
if
Weather Set1
weatherstate
Set2
=
Weather Sense3
toweather
Weather Sense4
toweather
Print5
Print6
Print Flush7
@counter0number
switchednullnull
rainnullnull
stormnullnull
weathersense @rain rain

After two seconds the processor turns the rain on and sees it immediately: the board shows rain: 1.

Field What is in it
first the kind of weather
second where to put the answer: 1 or 0
  • a script checks itself: it turned a storm on, made sure it is running, and only then counted the task done;
  • reacting to the map’s weather: on some maps weather comes on by itself, and a script can adapt — by giving the player a hint, for instance;
  • a board: a world processor tells the player what is going on.
weathersense @sandstorm storm
jump 5 equal storm 0
control enabled projector1 1

Unofficial fan project, not affiliated with Anuke. Mindustry sprites, fonts and translations © Anuke, used under GPL-3.0; Fira Code under OFL-1.1. Site code is GPL-3.0.