GetFogDistance: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
 (→Syntax)  | 
				 ("Added" getFogDistance( ) function page)  | 
				||
| Line 1: | Line 1: | ||
{{Server client function}}  | |||
__NOTOC__  | __NOTOC__  | ||
{{  | This function will tell you what is the current fog render distance.  | ||
{{Note|The function will return ''false'' server-side if fog distance has not been set before the function is called.}}  | |||
==Syntax==  | ==Syntax==  | ||
<syntaxhighlight lang="lua">  | <syntaxhighlight lang="lua">  | ||
float getFogDistance ()  | float getFogDistance ( )  | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
===Returns===  | |||
Returns a ''float'' with the current fog render distance, ''false'' if the operation could not be completed.  | |||
==Example==  | ==Example==  | ||
This example will demonstrate basic functionality of the function.  | |||
<syntaxhighlight lang="lua">  | <syntaxhighlight lang="lua">  | ||
function fogDistance()  | function fogDistance( )  | ||
	outputChatBox("Your fog distance is: ".. getFogDistance())  | 	outputChatBox( "Your fog distance is: " .. tostring( getFogDistance( ) ) )  | ||
end  | end  | ||
addCommandHandler("fog", fogDistance)  | addCommandHandler( "fog", fogDistance )  | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
==See Also==  | |||
{{World_functions}}  | |||
Revision as of 13:12, 3 August 2014
This function will tell you what is the current fog render distance.
Syntax
float getFogDistance ( )
Returns
Returns a float with the current fog render distance, false if the operation could not be completed.
Example
This example will demonstrate basic functionality of the function.
function fogDistance( ) outputChatBox( "Your fog distance is: " .. tostring( getFogDistance( ) ) ) end addCommandHandler( "fog", fogDistance )
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