Skip to content

Current weather

Read, edit, and apply the simulator's current weather from Flow Pro scripts.

Updated View as Markdown
For humans
Flow APIFlow Pro scriptingWeather

This article covers the following platforms

Read the simulator’s current weather structure, edit it, and apply it back to the simulator.

get_weather()

Get the current in-simulator weather structure.

SignatureTypeScript contract
get_weather(): Record<string, unknown>
ExampleJavaScript
const weather = this.$api.weather.get_weather();
console.log(weather);

Returns

Record<string, unknown>Editable object representing the current in-simulator weather.

set_weather()

Apply a weather structure to the simulator.

SignatureTypeScript contract
set_weather(weather_object: Record<string, unknown>): void

Parameters

NameTypeRequiredDescription
weather_objectRecord<string, unknown>YesIn-simulator weather structure, obtainable from get_weather().
ExampleJavaScript
const weather = this.$api.weather.get_weather();
// Update documented fields on the returned structure.
this.$api.weather.set_weather(weather);

Returns

voidNo direct return value is documented.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close