Other great resources: Official JS API docs, Scripting Forum
setSky()
- Aubergine
Syntax
var success = setSky(texturePage, windSpeed, skyboxScale);
Parameters
Parameter | Type | Mandatory | Notes | Warzone Version |
---|---|---|---|---|
texturePage | String | Sets the sky image. Can reference either an existing page name as defined in the WRF system, or a filename of a PNG file located in the existing texture paths. PNG files must be multiples of 128 pixels high/wide. Default: | 3.2 | |
windSpeed | Number | The speed of the wind, which determines the rate at which the skybox auto-rotates. A speed of 0 will stop the skybox from rotating. Negative values cause the skybox to rotate anti-clockwise, positive values cause it to rotate clockwise. For best results use values between -2.0 → +2.0, anything faster will be too fast and look unrealistic. Default: | 3.2 | |
skyboxScale | Number | The size of the skybox. Bigger values push the skybox further away from the map and increase the height and width of the skybox sides, smaller values do the opposite. For best results use values between 4000.0 (small & close) → 20000.0 (big & far). Anything less than 4000 will likely result in the top of the skybox becoming visible when the camera is horizontal. When doing scripted camera views, large values enable the camera to be tilted upwards slightly. Default: | 3.2 |
Return value
Value | Type | Notes | Game Version |
---|---|---|---|
true | Boolean | The sky was changed successfully | 3.2 |
false | Boolean | There was a problem changing the sky. | 3.2 |
<error> | Error | Invalid parameters. | 3.2 |
Example
setSky("page-25", -0.7, 20000.0);
Video
By changing the sky texture every 100ms you can create animated skies:
Availability 3.2+
Requires:
- Warzone 3.2 or above
Contents
Jump to:
See also
Related articles:
- Skybox Mods – how to mod the skybox images
- setWeather() – change weather effects
- setSunIntensity() – change brightness, colour, etc., of sun
- setSunPosition() – change the position of the sun