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

Syntax

integer llEdgeOfWorld( vector pos, vector dir );

Forced delay: 0.0 seconds. Energy: 10.0.

Parameters

vector pos
position in region coordinates
vector dir (direction)
direction

The z component of dir is ignored.

Return value

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

Caveats

Examples

//--// 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

Constants

Functions