Checker JS script does not clean up or go away


#1

I thought I would try some of the Java script examples in the sandpit.
The script I tried here checker script tutorial

the instructions state:- Upon load, the script should run, producing a 20 meter x 20 meter
checkered Entity floor under your avatar. After creating the floor, the
script will close itself and vanish from the list of running scripts.

However this is not the case. The script still runs even after I click the stop all scripts button.
It even runs after I have deleted the folder with the script.
So if you go to the SandBox they will be a large white and blue checkerd pattern over the floor.


#2

Ok I have figured it out. I have to delete all the entries and they are tons of them


#3

Quite surprised by that since the script could have created the pieces as entities with a limited lifetime. Then while running it could periodically extend their lifetime to keep the pieces around.


#4

That script was originally written for Voxels, thats how old it is, and converted to entities this year.
It is designed to be a work platform, it states that, you have to delete them manually.
The script does self close but the floor is persistent.

The entity edit tools were very different then and it was easy to delete a bunch of stuff, now the tools only allow for deleting a single entity at a time.

Here is a script that will clean up all objects around you, delete the floor in one go.
Warning, dont run this script anywhere near anything you dont want deleted, you have been warned.

EDITED to only delete Box entities

// find all Box entities within given radius and delete them.
// Adrian 31 May 2015
var radius = 20.0;
var ids = Entities.findEntities(MyAvatar.position, radius)
for( i = 0; i < ids.length; i++){
    var id = ids[i];
    var properties = Entities.getEntityProperties(id);
    if(properties.type == "Box" ) { 
        Entities.deleteEntity(id);
    }
}
Script.stop();

#5

Oh crumbs. thank M8. I have deleted half of them but I was looking for a script that merged blocks. They make a solid ground for the characters to walk on


#6

I arrived here just as voxels were dropped. Did voxels go away because they were too expensive?


#7

I the only time I ever used voxels was with Cloud Party. But someone in the Cloud Party crew had built it into the game software. I think HIFI is waiting for someone that knows how to develop the feature.