Arma 3 Scripting

Command in Environment

setGusts

Also available as Markdown and JSON, or read the original wiki page.

Description

Changes the gusts value smoothly during the given time (in seconds). A time of zero means there will be an immediate change.

Syntax

time setGusts value

Parameters:

Returns: Nothing

Examples

Example 1

60 setGusts 0.75;

See also

gusts · wind · setWind

Community notes

Sa-Matra

Unlike most of weather commands, this one does not set gusts instantly but on next frame (in 2 frames in practice), so running it multiple times will overwrite each other. setRainbow has same behavior. In order to set gusts to some value and then have it change to another over time, you need to first do 0 setGusts 0 and then 100 setGusts 1 after 2 frames. Example:

// Initial gusts you want
0 setGusts 0;

// A thread to wait for 2 frames
(diag_frameNo + 2) spawn {
    waitUntil {
        // Code in braces is not executed until wanted frame is reached because of lazy evaluation
        diag_frameNo >= _this && {
            100 setGusts 1;
            true; // positive condition result to end waitUntil and spawned thread
        };
    };
};