SixL server API / world / WorldMp

Interface: WorldMp

The world: mp.world.

Example

mp.world.time.set(12, 0, 0);

Properties

time

time: WorldTimeMp

The in-game time of day. The default is 12:00.

Remarks

Use time.set(...) or the hour, minute, second fields. Assigning a plain { hour, minute, second } object to mp.world.time also works at run time.

Example

mp.world.time.set(8, 30);

trafficLights

trafficLights: WorldTrafficLightsMp

The traffic lights.

Example

mp.world.trafficLights.locked = true;

weather

weather: string

The weather.

Remarks

Partial: the value reaches the clients and the scripts, but the game's weather does not change yet. Reads null until set.

Example

mp.world.weather = 'RAIN';

Methods

removeIpl()

removeIpl(ipl): void

Unloads an IPL for everyone.

Parameters

ipl

string

The IPL name.

Returns

void

Remarks

The server tells the clients now and again to players who join later.

Example

mp.world.removeIpl('some_ipl');

requestIpl()

requestIpl(ipl): void

Loads an interior placement (IPL) for everyone.

Parameters

ipl

string

The IPL name.

Returns

void

Remarks

The server tells the clients now and again to players who join later.

Example

mp.world.requestIpl('some_ipl');

setWeatherTransition()

setWeatherTransition(weather, duration?): void

Changes the weather with a transition.

Parameters

weather

string

The weather name.

duration?

number

The transition time (default 0), as the clients interpret it.

Returns

void

Remarks

Partial: the value reaches the clients and the scripts, but the game's weather does not change.

Example

mp.world.setWeatherTransition('CLEAR', 30);