llModifyLand
function
Function syntax
llModifyLand(integer action,// LAND_* action flag to perform (e.g.,LAND_LEVEL,LAND_RAISE,LAND_LOWER,LAND_SMOOTH,LAND_NOISE, orLAND_REVERT). Values: ModifyLandActioninteger brush// Brush size (0, 1, or 2, representing 2m x 2m, 4m x 4m, or 8m x 8m). Values: ModifyLandBrush
);- Energy
- 10
Modifies the terrain using the specified land action and brush size (0, 1, or 2, corresponding to 2m x 2m, 4m x 4m, or 8m x 8m).
Modify land with action on brush
The position of the prim is used to determine the input for various flags.
llModifyLand(0, 0);Specification
Section titled “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
Section titled “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
llModifyLandin 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
Section titled “Examples”Example 1
default{ state_entry() { llSetTimerEvent(0.1); }
timer() { llModifyLand(LAND_LEVEL, LAND_BRUSH_SMALL); }}Known issues
Section titled “Known issues”From the issue templates included by the wiki article:
- SVC-3272 (fs): LSL: llModifyLandStrength
- STORM-2006: type=bug|Brush constants are all off-by-one.
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.