mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-01 04:23:00 +02:00
15 lines
No EOL
396 B
JavaScript
15 lines
No EOL
396 B
JavaScript
var scriptName = "Controller";
|
|
|
|
function findScriptsInRadius(r)
|
|
{
|
|
var n = 0;
|
|
var arrayFound = Entities.findEntities(MyAvatar.position, r);
|
|
for (var i = 0; i < arrayFound.length; i++) {
|
|
if (Entities.getEntityProperties(arrayFound[i]).script.indexOf(scriptName) != -1) {
|
|
n++;
|
|
}
|
|
}
|
|
print("found " + n + " copies of " + scriptName);
|
|
}
|
|
|
|
findScriptsInRadius(100000); |