LlEdgeOfWorld

De DigiWiki.

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

Returns an integer that is a boolean, TRUE indicating there is a simulator in the direction indicated.

  • vector pos – position in region coordinates
  • vector dir – direction
//--// 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" );
    }
  }
}
Outils personnels
  • Cette page a été consultée 429 fois.
donate
Google Ads