SLUniverse Forums - View Single Post - How can I find an invisible object?
View Single Post
Old 09-02-2008, 10:51 AM   #12 (permalink)
Similar McMillan
Member
 
Similar McMillan's Avatar
Eels?
 
Join Date: Aug 2007
Posts: 57
SL Join Date: 2007-02-06
Business: SI

Quote:
Originally Posted by Brave Republic View Post
I have the same issue with some grouped objects that failed to rez (what she means by transparent isn't that it has an alpha texture, but that it's eating up prim count and is no where to be seen).

I tried some gadgets like Solvag's locator, CTRL +ALt T (my missing objects did have some alpha) as well as camera scanning all areas it could be, and using "show objects" under "About Land"
Some scanners will show "object not in sim" for ghostprims (which also means they can't point them out to you), but usually the only way is to walk around until you bump into them (and that only works if they are large, of course).

It's very primitive and since it only handles 16 objects at a time, you have to move it around a good bit, but I wrote this a while ago because we had a lot of problems with ghostprims in my sandbox.
Problem with it is that if it doesn't find any ghostprims, it doesn't necessarily mean there aren't any (if it finds 16 normal objects first, for example). And, of course, it can't point them out either, only count them.
It can certainly be improved (a lot), but it does work for me and perhaps someone will find it useful.

Code:
// SMM-Ghost Prim Detector 0.1

integer gScanType = PASSIVE;
float gScanRange = 50.0;
float gScanRate = 10.0;
float gScanArc = PI;

vector gTextColour = <1,1,1>;
key gOwner;
integer gScanOn;



default
{
    on_rez(integer start_param)
    {
        llResetScript();
    }
    
    state_entry()
    {
        gScanOn = FALSE;
        llSetObjectName(llGetScriptName());
        gOwner = llGetOwner();
        llSetText("Inactive", gTextColour, 1.0);
    }

    touch_start(integer total_number)
    {
        if (gScanOn == FALSE)
        {
            llSetTimerEvent(gScanRate);
            gScanOn = TRUE;
            llOwnerSay("nType: " + (string)gScanType
                        + "nRange: " + (string)gScanRange
                        + "nRate: " + (string)gScanRate);
                        
        }
        else if (gScanOn == TRUE)
        {
            llSetTimerEvent(0);
            gScanOn = FALSE;
            llSetText("Inactive", gTextColour, 1.0);
        }
    }
    
    timer()
    {
        llSensor("", NULL_KEY, gScanType, gScanRange, gScanArc);
    }
    sensor(integer num_detected)
    {
        integer ghostcount = 0;
        integer normalcount = 0;
        string output = "";
        integer x;
        for(x = 0 ; x < num_detected ; x++)
        {
            list a = llGetObjectDetails(llDetectedKey(x), ([OBJECT_NAME, 
                    OBJECT_DESC, OBJECT_POS, OBJECT_ROT, OBJECT_VELOCITY,
                    OBJECT_OWNER, OBJECT_GROUP, OBJECT_CREATOR]));
            if ((llList2String(a,3) == "") && (llList2String(a,2) == "") && (llList2String(a,5) == "") && (llList2String(a,7) == ""))
            {
                ghostcount = ghostcount + 1;
            }
            else if ((llList2String(a,3) != "") && (llList2String(a,2) != "") && (llList2String(a,5) != "") && (llList2String(a,7) != ""))
            {
                normalcount = normalcount + 1;
        }
        
        llSetText("Objects within " + llGetSubString((string)gScanRange, 0,4) +  "m:"
            + "nGhost objects: " + (string)ghostcount
            + "nNormal objects: " + (string)normalcount , gTextColour, TRUE);
        }
    }

    no_sensor()
    {
        llSetText("No ghost objects detected", <1.0,0.5,0.5>,1.0);
    }
}

Quote:
My final idea *if a reboots doesnt do it) is to move all objects off my 1/4 sim to adjacent one then hit "return all" in the about land box so objects are back to default , then move it all back
If they are ghost prims, you can't return them, but the reboot really should fix it. Always has for me, at least.
__________________
"Madcow Cosmos: I have learned many things from sl, but I think the most important one is that women are natural light sources"
Similar McMillan is offline   Reply With Quote
2 Users Said Thanks :