LlModifyLand
Looking for the current API? Open the llModifyLand reference →
Wiki description
Modify land with
action on brushFunction notes
The position of the prim is used to determine the input for various flags.
Specification
| Action | Description | |
|---|---|---|
| LAND_LEVEL | 0 | Levels on prim center |
| LAND_RAISE | 1 | Raises the land |
| LAND_LOWER | 2 | Lowers the land |
| LAND_SMOOTH | 3 | Smooths the land |
| LAND_NOISE | 4 | Makes the land rough |
| LAND_REVERT | 5 | Restores to baked value |
| Brush | Value | Size | ||
|---|---|---|---|---|
| LAND_BRUSH_SMALL | 0 | 2m x 2m | ||
| LAND_BRUSH_MEDIUM | 1 | 4m x 4m | ||
| LAND_BRUSH_LARGE | 2 | 8m x 8m | ||
| 1 | 4m x 4m | |||
| 2 | 8m x 8m | |||
| 3 | 8m 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.
Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SVC-3272|LSL: llModifyLandStrength|type=fs|status=open}}Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|STORM-2006|type=bug|Brush constants are all off-by-one.}}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.