OsTerrainSetHeight

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Added initial example code. Please review and confirm as accurate.)
Line 1: Line 1:
LSL: integer osTerrainSetHeight(integer x, integer y, float val)
+
LSL: integer osSetTerrainHeight(integer x, integer y, float val) 
  
C#: integer osTerrainSetHeight(integer x, integer y, double val)
+
C#: integer osSetTerrainHeight(integer x, integer y, double val)  
  
Sets terrain height X & Y Values, double = float.
+
! NB: Prior to Dec.10.2010 This command was osTerrainSetHeight(integer x, integer y, float val);  This is now deprecated
 
+
[[osTerrainFlush]] should be called after all the terrain-changes have been done to update Terrain Data.
+
  
  
NOTE:  INCOMPLETE, needs further data to complete with example.
 
  
<!-- Note that the following example code is untested! Please test, and if confirmed as working, remove this comment. -->
+
Sets terrain height X &amp; Y Values, double = float.  
  
'''Example Usage:'''
+
[[OsTerrainFlush]] should be called after all the terrain-changes have been done to update Terrain Data.
<source lang="lsl">
+
 
 +
<br>NOTE: INCOMPLETE, needs further data to complete with example. <!-- Note that the following example code is untested! Please test, and if confirmed as working, remove this comment. -->
 +
 
 +
'''Example Usage:''' <source lang="lsl">
 
  default
 
  default
 
  {
 
  {
    touch_start()
+
touch_start()
    {
+
{
      osTerrainSetHeight(40, 101, 21.4);
+
osSetTerrainHeight(40, 101, 21.4);
      osTerrainFlush();
+
osTerrainFlush();
    }
+
 
  }
 
  }
</source>
+
}
 
+
</source>  
 
+
  
 
[[Category:OSSL]]
 
[[Category:OSSL]]

Revision as of 15:57, 10 December 2010

LSL: integer osSetTerrainHeight(integer x, integer y, float val) 

C#: integer osSetTerrainHeight(integer x, integer y, double val)

! NB: Prior to Dec.10.2010 This command was osTerrainSetHeight(integer x, integer y, float val);  This is now deprecated


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

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


NOTE: INCOMPLETE, needs further data to complete with example.

Example Usage:
default
 {
 touch_start()
 {
 osSetTerrainHeight(40, 101, 21.4);
 osTerrainFlush();
 }
 }
Personal tools
General
About This Wiki