SetOcclusionsEnabled: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server client function}} This function is used to enable or disable occlusions. Occlusions are used by GTA to enhance performance, however when removeWorldModel i...") |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
This function is used to enable or disable occlusions. Occlusions are used by GTA to enhance performance | This function is used to enable or disable occlusions. Occlusions are used by GTA to enhance performance by hiding objects that are (normally) obscured by certain large buildings. However when [[removeWorldModel]] is used they may also have the undesired effect of making parts of the map disappear. Disabling occlusions will fix that. | ||
==Syntax== | ==Syntax== | ||
Line 18: | Line 18: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- Remove all world models | -- Remove all world models | ||
for i= | for i=550,20000 do | ||
removeWorldModel(i,10000,0,0,0) | removeWorldModel(i,10000,0,0,0) | ||
end | end | ||
Line 27: | Line 27: | ||
==See Also== | ==See Also== | ||
{{World functions}} | {{World functions}} | ||
Latest revision as of 15:41, 7 November 2024
This function is used to enable or disable occlusions. Occlusions are used by GTA to enhance performance by hiding objects that are (normally) obscured by certain large buildings. However when removeWorldModel is used they may also have the undesired effect of making parts of the map disappear. Disabling occlusions will fix that.
Syntax
bool setOcclusionsEnabled ( bool enabled )
Required Arguments
- enabled: A bool specifying if GTA occlusions should be enabled
Returns
Returns true if the setting was set correctly, false if invalid arguments were passed.
Example
This example shows occlusions being disabled after the whole map has been cleared:
-- Remove all world models for i=550,20000 do removeWorldModel(i,10000,0,0,0) end -- Turn off occlusions setOcclusionsEnabled( false )
See Also
- 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