IsWaterDrawnLast: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Zangomangu (talk | contribs) mNo edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{New feature/item| | {{New feature/item|3.0130|1.3.0|4585| | ||
This function | This function determines whether [[water]] is drawn last in the rendering order. | ||
}} | }} | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> bool | <syntaxhighlight lang="lua"> bool isWaterDrawnLast ( )</syntaxhighlight> | ||
===Returns=== | ===Returns=== | ||
Returns ''true'' if water drawn last in rendering order, ''false'' otherwise. | Returns ''true'' if water is drawn last in the rendering order, ''false'' otherwise. | ||
==Example== | ==Example== | ||
This example toggles water to be drawn last. | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function toggleWaterDrawnLast () | |||
local bWaterDrawnLast = not isWaterDrawnLast() | |||
outputChatBox (string.format('setWaterDrawnLast: %s', tostring(bWaterDrawnLast))) | |||
return setWaterDrawnLast (bWaterDrawnLast) | |||
end | |||
addCommandHandler ('togglewater', toggleWaterDrawnLast) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 22: | Line 27: | ||
==See Also== | ==See Also== | ||
{{Client water functions}} | {{Client water functions}} | ||
Latest revision as of 14:33, 5 January 2014
This function determines whether water is drawn last in the rendering order.
Syntax
bool isWaterDrawnLast ( )
Returns
Returns true if water is drawn last in the rendering order, false otherwise.
Example
This example toggles water to be drawn last.
function toggleWaterDrawnLast () local bWaterDrawnLast = not isWaterDrawnLast() outputChatBox (string.format('setWaterDrawnLast: %s', tostring(bWaterDrawnLast))) return setWaterDrawnLast (bWaterDrawnLast) end addCommandHandler ('togglewater', toggleWaterDrawnLast)
Requirements
Minimum server version | n/a |
---|---|
Minimum client version | 1.3.0.04585 |
Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.3.0.04585" />
See Also
Shared
- createWater
- getWaterColor
- getWaterVertexPosition
- getWaveHeight
- resetWaterColor
- resetWaterLevel
- setWaterColor
- setWaterLevel
- setWaterVertexPosition
- setWaveHeight