GetWeatherTransitionDuration: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Automatyczna aktualizacja dokumentacji funkcji
 
Complete Lua function catalog
 
Line 28: Line 28:
* A value of 0 indicates an immediate weather transition.
* A value of 0 indicates an immediate weather transition.


[[Category:Lua Functions]]
[[Category:Server Functions]]
[[Category:Server Functions]]
[[Category:World Functions]]
[[Category:World Functions]]

Latest revision as of 09:53, 15 August 2026

getWeatherTransitionDuration

Returns the transition duration associated with the current authoritative weather state.

Syntax

int transitionMs = getWeatherTransitionDuration()

Parameters

This function does not accept parameters.

Returns

Returns the transition duration in milliseconds.

Examples

Display the current weather and transition duration:

local message = string.format(
    "Weather: %s (%d ms)",
    getWeather(),
    getWeatherTransitionDuration())
outputDebugString(message)

Notes

  • Available only in server-side resource scripts.
  • A value of 0 indicates an immediate weather transition.