Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Pet project - lend a hand if you would :)

Synergy Belvedere
Prim Reaper
Join date: 7 Jul 2004
Posts: 253
02-15-2005 12:59
I'm a bit of a newb still with scripting but know my way around it now better than I used to. What I'm trying to get accomplished is a script that uses something like llSensor to detect all passive objects within a certain distance (no issue here), but then log what it finds in some sort of list that will stay there even if i pick up the prim with the script in it and drop it at a later date.

To be specific, say you made a house. You drop this prim/script in the middle, tell it "go" or some such drivel, and it logs all the prims and their attributes that it senses.

You pick up your prim/script and go somewhere else. Drop it, and tell it "reproduce" and it rez's prims according to the locations, sizes, etc that it finds in the log it created earlier.

yes, I know dont flame me, I could simply just pick up the house & drop it using standard SL "take" methods, but I never said this was a practical idea lol.

So what do you all think? Possible? Hints? tips? advice? Write it for me? lol jk
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
02-15-2005 13:09
1) Sensors are limited to 16 returns
2) I believe sensed objects are link sets, not individual prims (if linked)
3) Something like this would *ahem* be a great way to copy someone else's build :rolleyes:

So in brief, not happening. Sorry.
_____________________
---
Rhombur Volos
King of Scripture & Kebab
Join date: 6 Oct 2004
Posts: 102
02-15-2005 13:12
Not impossible, but certainly not worth the effort either.

The only prim information you get using llSensor that can even be used in such a way is llDetectedPos and llDetectedRot. Not nearly enough to replicate anything.

If you actually wanted to do this, you'd need to put a script in every single prim that the pet should store, that distributes nearly all of its prim parameters in a string.
Thereafter, you'd need a hefty parser to turn that string into the info you need to rez it again.

But what am i saying, you should already know this, since i assume you have already read the wiki entries on llDetected and llGetPrimitiveParams before posting this entry ;)
Synergy Belvedere
Prim Reaper
Join date: 7 Jul 2004
Posts: 253
02-15-2005 13:56
Yes Rhombur I have, thank you for the clear and concise response though.

You're all probably right, not worth the effort. I'll move on to some other pet project that's more feasible, this just sounded like alot of fun! Imagine on command a house builds itself before your eyes! :eek:

Thx anyway :)
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
02-15-2005 19:42
I actually already have something like this built. It's nice.

Maybe I should think about selling it. It requires a bit of setup, but I suppose intelligent people will be able to figure it out.
_____________________
</sarcasm>
Rhombur Volos
King of Scripture & Kebab
Join date: 6 Oct 2004
Posts: 102
02-16-2005 07:10
Autorezzing is a commonly used and nice feature.
I've made one myself actually, but i mainly use it for large unlinkable objects split into sections, since objects that can be linked really don't need to be rezzed in pieces as it would be a waste of sim resources.

And yes, it is fun to watch :)
Carnildo Greenacre
Flight Engineer
Join date: 15 Nov 2003
Posts: 1,044
02-16-2005 23:14
This is very similar to my "volumetric mapping" system. I've found a few things about remote sensing of objects:

1) Sensed objects are linked sets. This is complicated further because the returned position is the position of the center of the link root, not the geometric center of the linkset.
2) Currently, it is possible to get around the 16-object limit with multiple scans, but this is difficult and is expected to stop working sometime in the near future.
3) There is no way of detecting texture properties of an object.
4) There is no way of detecting type, cut, or other deformations.
_____________________
perl -le '$_ = 1; (1 x $_) !~ /^(11+)\1+$/ && print while $_++;'
Tommy Oz
Registered User
Join date: 13 Jan 2005
Posts: 56
02-17-2005 08:36
What do you mean by multiple scans will not work the future? Is this considered a bug?
Carnildo Greenacre
Flight Engineer
Join date: 15 Nov 2003
Posts: 1,044
02-18-2005 23:12
From: Tommy Oz
What do you mean by multiple scans will not work the future? Is this considered a bug?


Right now, if you run a llSensor scan twice in a row with a given set of parameters, and there are more than 16 objects within the sensor radius, you usually won't get the same set of 16 objects returned twice in a row. That may change in the future.
_____________________
perl -le '$_ = 1; (1 x $_) !~ /^(11+)\1+$/ && print while $_++;'