Skip to content
lsl.devlsl.devLSL Dev

llEdgeOfWorld

function
Function syntax
integer llEdgeOfWorld(
  1. vector pos,// Position vector in region coordinates.
  2. vector dir// Direction vector.
);
Returns
integer
Energy
10

Checks to see whether the border hit by dir from pos is the edge of the world (has no neighboring simulator).

The z component of dir is ignored.

Returns an integer value. FALSE indicating there is a simulator in the direction indicated.

How to use
integer result = llEdgeOfWorld(ZERO_VECTOR, ZERO_VECTOR);
  • If the x and y components of dir are zero (like with ZERO_VECTOR), TRUE is always returned.
  • pos must be in the region.
  • Can only be used to detect directly adjacent regions, not diagonally adjacent regions
  • This function will also return TRUE if llRequestSimulatorData() returns “up” for an adjacent region but that region doesn’t visibly show when standing next to its border.
Example 1
//--// Tells if there are neighboring sims on touch //--//
default{
touch_start( integer vIntTouched ){
vector vPosObject = llGetPos();
if (!llEdgeOfWorld( vPosObject, <0.0, 1.0, 0.0> )){
llOwnerSay( "There is a Sim to the North" );
}
if (!llEdgeOfWorld( vPosObject, <1.0, 0.0, 0.0> )){
llOwnerSay( "There is a Sim to the East" );
}
if (!llEdgeOfWorld( vPosObject, <0.0, -1.0, 0.0> )){
llOwnerSay( "There is a Sim to the South" );
}
if (!llEdgeOfWorld( vPosObject, <-1.0, 0.0, 0.0> )){
llOwnerSay( "There is a Sim to the West" );
}
}
}
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.