Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create 2 prims and color one red and the other green. The red prim is the NORTH_EAST_CORNER and should be positioned in the NORTH_EAST_CORNER on the "roof" or "ceiling" of the area you want to scan. The green prim is the SOUTH_WEST_CORNER and should be positioned in the SOUTH_WEST_CORNER on the "floor" of the area you want to scan.
- vector NORTH_EAST_CORNER=<223.95860, 29.33944, 2706.80542>;
- vector SOUTH_WEST_CORNER=<208.70197, 14.07825, 2700.38452>;
- default
- {
- state_entry()
- {
- llSetTimerEvent(1.0);
- }
- timer()
- {
- llSetTimerEvent(0.0);
- list keys=llGetAgentList(AGENT_LIST_PARCEL,[]);
- integer total=llGetListLength(keys);
- integer idx = 0;
- for(idx=0;idx<total;++idx)
- {
- key av=llList2Key(keys,idx);
- list params=llGetObjectDetails(av,[
- OBJECT_POS
- ]);
- vector AvPos=(vector)llList2String(params,0);
- if
- (AvPos.x > SOUTH_WEST_CORNER.x & AvPos.x < NORTH_EAST_CORNER.x & AvPos.y > SOUTH_WEST_CORNER.y & AvPos.y < NORTH_EAST_CORNER.y & AvPos.z > SOUTH_WEST_CORNER.z & AvPos.z < NORTH_EAST_CORNER.z)
- {
- llOwnerSay(llKey2Name(av) + " has entered the area");
- }
- }
- llSetTimerEvent(1.0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement