Howto find entities with script and get the entityname?


I don’t know if there is already script support to scan for entities and get the name from it.
If there is already script support for it. is there some very simple small basic example ?
Because with the entity name option i get closer to mabey make what i want.

Or at least try.


Yes. There is. @Adrian and @Coal perform this task when you click on a plot of land on hifi://earth if the land is freely available, it grabs your account name and sends it to them so that they may give you modification rights…


After reading your original request, I realize you are attempting something similar to the llSensor() in SL.

I don’t have time to investigate that, but I’m fairly certain you can do this just keep in mind that HF units are in metric units.



I think you misunderstand it.
It’s indeed more like llSensor in SL. you scan the area and get a list of objects with the name.
The script @adrian and @coal use works pretty sure by entity click.detection.
But i need to know the location, name etc. of entitity without clicking it. becaue the script cannot click.


entityList.js dos search the entities and give the entity properties.


Nice, i go check that script.


I tried it, but it’s not doing much. it’s not doing anything ! Unless i use the script wrong.
So that’s not helping to understand how to scan for entities around the script.


This might be along the lines of what you’re looking for …

var entities,

entities = Entities.findEntities(MyAvatar.position, 100);

for (i = 0; i < entities.length; i += 1) {
    var entity = entities[i];
    properties = Entities.getEntityProperties(entity);
        + "\n    name: " +
        + "\n    type: " + properties.type 
        + "\n    url:  " + properties.modelURL);