setWindVelocity | Multi Theft Auto: Wiki Skip to content

setWindVelocity

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function changes the wind velocity. The wind shakes the vegetation and makes particles fly in a direction. The intensity and direction of the effect deppends of the wind velocity in each axis.

Syntax

setWindVelocity ( )

Code Examples

server

This example shows how to make a simple /windVelocity command.

local function windVelocityCommand(_, x, y, z)
-- Ensure all arguments are valid (default to 0 otherwise)
x = tonumber(x) or 0
y = tonumber(y) or 0
z = tonumber(z) or 0
-- Set the wind velocity, and inform the user of the change.
setWindVelocity(x, y, z)
outputChatBox("* Wind velocity set to ("..x..", "..y..", "..z..").", 0, 255, 0)
end
addCommandHandler("windVelocity", windVelocityCommand)

See Also

World Functions