Skip to content
lsl.devlsl.devLSL Dev

LlModifyLand

Looking for the current API? Open the llModifyLand reference →

Wiki description

Modify land with action on brush

Function notes

The position of the prim is used to determine the input for various flags.

Specification

ActionDescription
LAND_LEVEL0Levels on prim center
LAND_RAISE1Raises the land
LAND_LOWER2Lowers the land
LAND_SMOOTH3Smooths the land
LAND_NOISE4Makes the land rough
LAND_REVERT5Restores to baked value
BrushValue Size
LAND_BRUSH_SMALL02m x 2m
LAND_BRUSH_MEDIUM14m x 4m
LAND_BRUSH_LARGE28m x 8m
LAND_SMALL_BRUSH14m x 4m
LAND_MEDIUM_BRUSH28m x 8m
LAND_LARGE_BRUSH38m x 8m
The "LAND_*_BRUSH constants are wrong.
Use the "LAND_BRUSH_*" constants instead.

Caveats

  • This function has no effect if the script's owner is offline or not in the same sim as the scripted object.
  • Uncontrolled use of llModifyLand in scripted objects may force the region's navmesh to rebake continually and cause Memory Allocated for the region to exceed its limit, making it impossible to rez objects. (BUG-9047)
  • This function has no effect if the scripted object is deeded to a group.
  • "LAND_BRUSH_*" constants are only present on Lua-enabled sims. On older sims, use their values 0, 1, and 2 instead. The "LAND_*_BRUSH" constants have incorrect values and are not recommended
  • If the script is in a prim that is attached to an avatar or is in the child prim of a linkset, then the local position relative to it's attachment point or root prim is used rather than the position within the region. (BUG-4929)
  • If land is not owned by script owner or the owner doesn't have terraform permissions, the script will silently fail.
  • You cannot change altitude beyond land terraform limits for the specified parcel..

Examples

default
{
    state_entry()
    {
        llSetTimerEvent(0.1);
    }
    
    timer()
    {
        llModifyLand(LAND_LEVEL, LAND_BRUSH_SMALL);
    }
}

Shared wiki helpers

The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.

Template:Issues/SVC-3272

Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SVC-3272|LSL: llModifyLandStrength|type=fs|status=open}}

Template:Issues/STORM-2006

Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|STORM-2006|type=bug|Brush constants are all off-by-one.}}

Template:Issues

Original shared helper source (conditional wiki logic is not evaluated)
{{#ifeq:{{NAMESPACE}}|Template|{{Multi-lang|<includeonly>category=Jira Issues</includeonly>}}}}<includeonly>{{#if:

The purpose of the following is to swap out the old code and use a new template without breaking the old templates.
{{#if:{{{status|}}}{{{resolution|}}}|
{{#vardefine:last_issue|{{{{{debugging|Issue/Version 1}}}|{{{1}}}|{{{2|}}}
|style={{{style|}}}
|status={{{status|}}}
|resolution={{{resolution|}}}
|priority={{{priority|}}}
|type={{{type|}}}
|dnc={{{dnc|}}}
|fc={{{fc|}}}
}}}}
|
{{#vardefine:last_issue|{{{{{debugging|Issue/Version 1}}}|{{{1}}}|{{{2|}}}
|style={{{style|}}}
|status={{{status|}}}
|resolution={{{resolution|}}}
|priority={{{priority|}}}
|type={{{type|}}}
|dnc={{{dnc|}}}
|fc={{{fc|}}}
}}}}
}}

{{#vardefine:issues{{#var:direction}}|{{#var:issues{{#var:direction}}}}
{{#var:last_issue}}}}

{{#ifexpr:{{#var:count-last-issue|0}} > 0|
{{#vardefine:bugs{{#var:direction}}|{{#var:bugs{{#var:direction}}}}
{{#var:last_issue}}}}
}}

}}{{#if:{{{1|}}}|{{#ifeq:{{NAMESPACE}}|Template|{{IssueTable}}[[Category:Jira Issues{{#var:lang}}|{{#explode:{{{1}}}|-|0}}-{{padleft:{{#explode:{{{1}}}|-|1}}|6|0}}]]}}}}</includeonly><noinclude>
{{documentation}}</noinclude>
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.