Forgot? Join

Scripting

LSL Guide

Every script function this grid actually runs, read straight from the region software rather than copied from a wiki — including the wolf* functions that exist only here.

Functions · Constants

llSetPos

LSL
void llSetPos(vector pos)

If the object is not physical, this function sets the position of the prim.\ If the script is in a child prim, Position is treated as root relative and the link-set is adjusted.\ If the prim is the root prim, the entire object is moved (up to 10m) to Position in region coordinates.

Parameters

TypeName What it does
vector pos The target position: region metres for a root prim, root-relative for a child.

Example

default
{
    touch_start(integer n)
    {
        // Rise 2 m, then come back down.
        vector here = llGetPos();
        llSetPos(here + <0, 0, 2>);
        llSleep(2.0);
        llSetPos(here);
    }
}

Move further than 10 m in one go

llSetRegionPos(<128, 128, 40>);
Sleeps 0.2s
Energy 10

The Linden Scripting Library — what every SL-compatible grid provides.

More in LSL