SetWorldProperty: Difference between revisions
Jump to navigation
Jump to search
(Add setWorldProperty) |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(One intermediate revision by one other user not shown) | |||
Line 31: | Line 31: | ||
setWorldProperty("SpriteBrightness", 0) | setWorldProperty("SpriteBrightness", 0) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{ | {{Client world functions}} |
Latest revision as of 17:35, 7 November 2024
Tip: This function can be used to implement custom time cycles and other advanced weather features. It allows you to override values set by the game for weathers (timecyc.dat).
The downside of overriding is the need to implement custom blending (to change weather properties over time creating night / day cycle). |
Tip: Test resource: worldprops.zip |
Syntax
bool setWorldProperty ( string property, var value [, var value, var value] )
OOP Syntax Help! I don't understand this!
- Counterpart: getWorldProperty
Required Arguments
- property: The property you wish to override.
Property | Type | Description |
---|---|---|
AmbientColor | RGB | The color of ambient light on map objects (including custom objects) |
AmbientObjColor | RGB | The color of ambient light on dynamically created elements (peds, vehicles) |
DirectionalColor | RGB | The color of direct light on dynamically created elements (peds, vehicles) |
Illumination | FLOAT | Multiplier for the directional light (DirectionalColor) |
SpriteSize | FLOAT | Point lights corona size (traffic lights) |
SpriteBrightness | FLOAT | Point lights corona brightness (also affects light on ground for light poles) |
LightsOnGround | FLOAT | Point lights ground reflection brightness (traffic lights) |
PoleShadowStrength | INT | Pole shadows alpha (used if volumetric shadows are disabled) |
ShadowStrength | INT | Shadows alpha (all shadows) |
ShadowsOffset | FLOAT | Shadows height |
BottomCloudsColor | RGB | Bottom (normal) clouds color |
CloudsAlpha | INT | Bottom (normal) clouds alpha |
LowCloudsColor | RGB | Low (skyline) clouds color (dependent on game hours) |
WetRoads | FLOAT | Wet roads weather effect (noticeable during driving) Turns on lights on ground during daytime |
Foggyness | FLOAT | Adds light fog effect for headlights and turns on lights on ground during daytime Also affects skyline clouds and shadows visibility |
Fog | FLOAT | Fog weather effect alpha |
RainFog | FLOAT | Rain fog weather effect alpha (different fog; used in rain weathers) (reset is smooth) |
WaterFog | FLOAT | Water fog alpha |
Rainbow | FLOAT | Rainbow alpha |
Sandstorm | FLOAT | Sandstorm sound volume (reset is smooth) |
- value: At least one value has to be provided.
Example arguments for
RGB: 255, 255, 255
FLOAT: 0.5
INT: 100
Returns
Returns true if successful, false otherwise.
Example
This example makes volumetric shadows darker:
setWorldProperty("ShadowStrength", 500)
This example turns off street lights:
setWorldProperty("SpriteBrightness", 0)
See Also
- createSWATRope
- getBirdsEnabled
- getCoronaReflectionsEnabled
- getGarageBoundingBox
- getGaragePosition
- getGarageSize
- getGroundPosition
- getInteriorFurnitureEnabled
- getNearClipDistance
- getPedsLODDistance
- getRoofPosition
- getScreenFromWorldPosition
- getVehiclesLODDistance
- getWorldFromScreenPosition
- isAmbientSoundEnabled
- isLineOfSightClear
- isWorldSoundEnabled
- processLineOfSight
- resetAmbientSounds
- resetBlurLevel
- resetColorFilter
- resetCoronaReflectionsEnabled
- resetNearClipDistance
- resetPedsLODDistance
- resetVehiclesLODDistance
- resetWorldSounds
- setAmbientSoundEnabled
- setBirdsEnabled
- setColorFilter
- setCoronaReflectionsEnabled
- setInteriorFurnitureEnabled
- setInteriorSoundsEnabled
- setNearClipDistance
- setPedsLODDistance
- setVehiclesLODDistance
- setWorldSoundEnabled
- testLineAgainstWater
- areTrafficLightsLocked
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGravity
- getHeatHaze
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getOcclusionsEnabled
- getRainLevel
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getWeather
- getWindVelocity
- getSkyGradient
- getPlayerBlurLevel
- getZoneName
- isGarageOpen
- removeWorldModel
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetWindVelocity
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorSoundsEnabled
- setMinuteDuration
- setMoonSize
- setOcclusionsEnabled
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setWeather
- setWeatherBlended
- setWindVelocity
- setJetpackMaxHeight
- setPlayerBlurLevel