llEdgeOfWorld
function
Function syntax
integer llEdgeOfWorld(vector pos,// Position vector in region coordinates.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.
integer result = llEdgeOfWorld(ZERO_VECTOR, ZERO_VECTOR);Caveats
Section titled “Caveats”- If the x and y components of dir are zero (like with
ZERO_VECTOR),TRUEis 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
TRUEifllRequestSimulatorData() returns “up” for an adjacent region but that region doesn’t visibly show when standing next to its border.
Examples
Section titled “Examples”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" ); } }}See also
Section titled “See also”Functions
Section titled “Functions”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.