Removing an object you can't select/return/take

Creating scripts
Post Reply
Ohn Lang
Posts: 142
Joined: Sun Dec 23, 2012 5:11 pm
Has thanked: 38 times
Been thanked: 67 times

Removing an object you can't select/return/take

Post by Ohn Lang »

There might be a better way to handle this, but this is what I did today.

Scenario: I had a prim that was rezzed a few days ago that I could not select or edit. It was scripted, and when i touched it, the script did what it was supposed to do. I had to log out and just logged back in today, and the object was still there. I couldn't right-click take, or edit. I also couldn't handle it with the region debug tools, it didn't show up. But when I used a sensor script, I could find it no problem. I also found that I could drag-drop a script into the object, even though I couldn't directly edit it.

So I made this script:

Code: Select all

//On state entry, chats to the owner the key and 
//name and location of the object the script was dropped into.
//This allows the owner to verify that the script is in the right object.
//If the owner chats "Delete [object name] now."
//The script will delete the object.
//Ohn made this to delete weird objects/prims
//that were rezzed but not selectable.

 


key myKey;
string myName;
vector myPosition;

checkObject() {
    llOwnerSay((string)myKey + ", " + myName + " located at " + (string)myPosition + " has deleteme script. If this is the right object, say 'Delete " + myName + " now.'"); 
}

deleteObject() {
    llOwnerSay((string)myName + " will die in ");
    integer index = 5;
    while (index)
    {
        // wait a sec
        llSleep(1.0);
        llSay(0, (string)index);
        --index;
    }
    llDie(); 
}
default
{
    state_entry()
    {
        myKey = llGetKey();
        myName = llGetObjectName();
        myPosition = llGetPos();
        llListen(0, "", llGetOwner(), "Delete " + myName + " now."); 
        checkObject();
        
    }
    listen( integer channel, string name, key id, string message )
    {
        deleteObject();
    }
}
These users thanked the author Ohn Lang for the post:
Ada Radius
User avatar
Ada Radius
Posts: 435
Joined: Sun Dec 23, 2012 6:20 pm
Has thanked: 659 times
Been thanked: 546 times

Re: Removing an object you can't select/return/take

Post by Ada Radius »

Blessings on your house Ohn! I had several of those boogers on one of my sims, all horrible drafts of particle emitters. I am no scriptor, so I ended up linking and saving the stuff I wanted to take back into inventory, then then using parcel object tools to get rid of the ghost prims, then rebuilding. This gadget will be a whole lot easier, to say the least.
Ohn Lang
Posts: 142
Joined: Sun Dec 23, 2012 5:11 pm
Has thanked: 38 times
Been thanked: 67 times

Re: Removing an object you can't select/return/take

Post by Ohn Lang »

when I first set up a multi-region world in Kitely, I ran into a similar problem with a 2-prim tree that I didn't particularly like, LOL. In editing the object, I'd managed to distance the two prims by about 2.5 regions apart, and from there couldn't do much of anything with them, couldn't unlink, couldn't select the child prim, snap! LOL. I wound up burying it under raised terrain. That world has gone the way of the dodo bird now, but I remember feeling so frustrated. I wish I had thought of this script then!
User avatar
Isis Ophelia
Posts: 170
Joined: Thu May 16, 2013 3:25 pm
Location: Germany
Has thanked: 87 times
Been thanked: 131 times
Contact:

Re: Removing an object you can't select/return/take

Post by Isis Ophelia »

I call those prims 'ghosts' because they are there and though not there. I had that problem when I exported items from grids using OS 0.7.2 or using grids with that version. Here how I get rid of them. I make a box near to the ghost and then holding Shift I draw a square until both the ghost and the new box are highlighted, now I can hit Delete either from the menu on top of my viewer or on my keyboard and voila! gone.
These users thanked the author Isis Ophelia for the post (total 6):
Dot MacchiConstance PeregrineIlan TochnerAdagio GreenwoodAda RadiusGhaelen DLareh
IDdesigns @ Kitely Marketplace http://www.kitely.com/market?store=2075571

You`d like to meet others inworld? Join the Meet & Chat Corner group and say hello
Post Reply