OsSetTerrainHeight

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
LSL: integer osSetTerrainHeight(integer x, integer y, float val);
+
----
C#: integer osSetTerrainHeight(integer x, integer y, double val);
+
'''NOTE''' : This function replaces the deprecated [[OsTerrainSetHeight]] function.
 +
----
  
Sets terrain height X & Y Values, double = float.
 
 
 
[[osTerrainFlush]] should be called after all the terrain-changes have been done to update Terrain Data.
 
  
 +
{|  width="100%" style="border: thin solid black"
 +
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
 +
|- valign="top"
 +
|'''Threat Level''' || <Threat Level goes here>
  
NOTE: INCOMPLETE, needs further data to complete with example.
+
|- valign="top"
 
+
|'''Function Syntax''' || <source lang="lsl">
<!-- Note that the following example code is untested! Please test, and if confirmed as working, remove this comment. -->
+
LSL: integer OsSetTerrainHeight(integer x, integer y, float val)
 
+
C#:  integer OsSetTerrainHeight(integer x, integer y, double val)
'''Example Usage:'''
+
</source>
<source lang="lsl">
+
|- valign="top"
 +
|'''Example(s)||<source lang="lsl">
 
  default
 
  default
 
  {
 
  {
 
     touch_start()
 
     touch_start()
 
     {
 
     {
       osSetTerrainHeight(40, 101, 21.4);
+
       OsSetTerrainHeight(40, 101, 21.4);
 
       osTerrainFlush();
 
       osTerrainFlush();
 
     }
 
     }
Line 23: Line 26:
 
</source>
 
</source>
  
 +
|}
 +
 +
Sets terrain height X & Y Values, double = float.
 +
 
 +
[[osTerrainFlush]] should be called after all the terrain-changes have been done to update Terrain Data.
 +
 +
[[Category:OSSL Functions]]
 +
[[Category:OSSL functions without threat level]]
  
'''NOTE''' : This function replaces the deprecated [[OsTerrainSetHeight]] function.
 
[[Category:OSSL]]
 
 
[[Category:OSSL functions without threat level]]
 
[[Category:OSSL functions without threat level]]

Revision as of 11:38, 11 June 2011


NOTE : This function replaces the deprecated OsTerrainSetHeight function.



OsSetTerrainHeight
Threat Level <Threat Level goes here>
Function Syntax
LSL: integer OsSetTerrainHeight(integer x, integer y, float val)
C#:  integer OsSetTerrainHeight(integer x, integer y, double val)
Example(s)
default
 {
    touch_start()
    {
       OsSetTerrainHeight(40, 101, 21.4);
       osTerrainFlush();
    }
 }

Sets terrain height X & Y Values, double = float.

osTerrainFlush should be called after all the terrain-changes have been done to update Terrain Data.

Personal tools
General
About This Wiki