Exports
The following events and exports can be used from your own scripts to interact and/or receive info from the weather script.
zoneUpdated
This event gets triggered when a zone is updated from server, contains the zone name and a table with zone info.
params:
zone:
string
data:
table
timeUpdated
This event gets triggered when in game time is updated.
params:
hours:
number
minutes:
number
seconds:
number
Freeze/Unfreeze Time and Weather for local player
Use this event to freeze or sync the time for a local player, useful for multicharacter, spawn scripts, houses/motel scripts, etc.
params:
state:
Boolean
hours:
number
optionalminutes:
number
optionalweather:
string
optionalblackout:
Boolean
optionalfog:
string
optional
getZone()
Use this export to get the current zone where the player is standing.
returns:
zone:
string
getBlackout()
Use this export to retrieve the current blackout state.
returns:
state: B
oolean
setRain()
Removes rain effects from the player, useful for those using YMAPs where rain comes through the roof creating puddles inside their map.
params:
state:
Boolean
Last updated