Skip to content
lsl.devlsl.devLSL Dev

llSetGroundTexture

function
Function syntax
integer llSetGroundTexture(
  1. list changes// A list of terrain detail properties and values to change.
);
Returns
integer
Energy
10

Changes the painted terrain textures on the region based on changes. The script owner must have estate management rights. Returns an integer status.

Changes the textures used to paint the terrain of a region. The owner of the script must be able to manage the estate.

How to use
integer result = llSetGroundTexture([]);
From the LSL definitions: GroundTextureParam (rule, then its arguments)
// TexturesTERRAIN_DETAIL_1, string texture_id  // texture or material, name or UUID; NULL_KEY or "" restores the defaultTERRAIN_DETAIL_2, string texture_idTERRAIN_DETAIL_3, string texture_idTERRAIN_DETAIL_4, string texture_id// Height blendingTERRAIN_HEIGHT_RANGE_SW, float low, float high  // low: max height of texture 1; high: min height of texture 4TERRAIN_HEIGHT_RANGE_SE, float low, float highTERRAIN_HEIGHT_RANGE_NW, float low, float highTERRAIN_HEIGHT_RANGE_NE, float low, float high// PBR scale, rotation and offsetTERRAIN_PBR_SCALE_1, vector uv_scale  // PBR only; repeats per metre, z ignoredTERRAIN_PBR_SCALE_2, vector uv_scaleTERRAIN_PBR_SCALE_3, vector uv_scaleTERRAIN_PBR_SCALE_4, vector uv_scaleTERRAIN_PBR_ROTATION_1, float rotation  // PBR only; radiansTERRAIN_PBR_ROTATION_2, float rotationTERRAIN_PBR_ROTATION_3, float rotationTERRAIN_PBR_ROTATION_4, float rotationTERRAIN_PBR_OFFSET_1, vector uv_offset  // PBR only; z ignoredTERRAIN_PBR_OFFSET_2, vector uv_offsetTERRAIN_PBR_OFFSET_3, vector uv_offsetTERRAIN_PBR_OFFSET_4, vector uv_offset
  • This function must be executed from a script in an object owned by the region owner or an estate manager.
  • This function is throttled at 4 calls every 2 minutes.
  • Always returns 0
  • PBR terrain is all or nothing. Mixing normal terrain textures with PBR textures will cause the PBR textures to appear gray.
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.