Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Click Detection and Copy All Parameters

Rock Vacirca
riches to rags
Join date: 18 Oct 2006
Posts: 1,093
05-05-2008 01:34
Hi guys,

I am thinking of a new project to copy the parameters of all my own created prims (without using Second Inventory).

I am thinking of rezzing large groups of objects on a huge empty plot I have (simply because I cannot remember what half of them are, what they look like, or do. I can then use this opportunity to delete all my rubbish cluttering my inventory).

I then would like to run a script, then walk among my objects, and as I left-click each one, the running script will detect that click, then gather all the object's parameters (dimensions, twists and taper etc, textures on each face, the name of any script or other objects in its contents), and then write those details to a notecard.

The reason for this is that I now have an OpenSim up and running, and I would like to recreate some of my SL builds in the OpenSim from the info in the notecards.

How much of the above is possible/simply not possible?

Rock
Laurence Corleone
Registered User
Join date: 12 Oct 2006
Posts: 126
05-05-2008 02:05
You can't use a script to write to a notecard.
_____________________
There are no stupid questions, just stupid people.
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
05-05-2008 02:49
In fact, your chances to win all the worlds lotteries are MUCH higher than the chance that you will succeed in writing to a notecard.

Though what you can do is enable chat logging and have your object spam the wanted data on channel 0.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
05-05-2008 09:04
You could also setup a script somewhere on a web server if one is convenient to simply log any data sent to it. You'll run into trouble with the single left-click though. What the system will need is really a script in every prim. Something llGiveInventory() might help with (coupled with Tools -> Set Scripts to Running in Selection). Plunk a script in the root prim or something and have it distribute itself to all the other prims in the object.

Anyway, this would actually be a pretty ideal problem for a custom client. It could even do the notecard thing if you really wanted it (though local storage is probably a decent enough option). However, if you were to go that way, you'd want to code it very carefully so that it checks object ownership and permissions and doesn't grab anything you wouldn't normally be able to from the standard client and LSL scripting system (hopefully that way you could avoid any mention of the Evil CopyBot).

If you are going to go the route of capturing chat output, PLEASE use llOwnerSay() or llInstantMessage() instead of going straight to channel zero. You won't have to worry about distance limits anyway if you do that, and you'll be saving the sim and everyone around you a great deal of yuck.
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
05-05-2008 09:40
Personally I'd just make it a little bit more human-involved.

Since you can't use a script to write to a notecard, just have it spit out the parameters, formatted as each line is a different parameter, in a specific format, etc. Then just copy/paste it from chat to a notecard, and then eventually make another script that can read those notecards because of the format, that would then recreate whatever the notecard params were.


Since you can't auto-write to a notecard, just copy/paste it.. not too hard ^_^
_____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
05-05-2008 10:21
From: Squirrel Wood
In fact, your chances to win all the worlds lotteries are MUCH higher than the chance that you will succeed in writing to a notecard.

Though what you can do is enable chat logging and have your object spam the wanted data on channel 0.


It's not totally impossible to write to a notecard, a script could IM the data to a bot, which in turn could be scripted to create a notecard and dump the data to the notecard, then give that notecard to you, so my money is on being able to write to a notecard over the lottery. The issue here is that the difficulty lies in collecting the data. llGetPrimitiveParams() must be executed inside the object itself, so instead of being able to walk around clicking a prim at random to get details, it would be more like walking around and dropping a script into a prim to get the details. Then the info could be IM'd or whatever.
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
05-05-2008 10:24
From: Johan Laurasia
It's not totally impossible to write to a notecard, a script could IM the data to a bot, which in turn could be scripted to create a notecard and dump the data to the notecard, then give that notecard to you, so my money is on being able to write to a notecard over the lottery. The issue here is that the difficulty lies in collecting the data. llGetPrimitiveParams() must be executed inside the object itself, so instead of being able to walk around clicking a prim at random to get details, it would be more like walking around and dropping a script into a prim to get the details. Then the info could be IM'd or whatever.

OK.... I think what was meant was that using LSL only it's impossible. Personally I think botting it would be just plain silly, way too much work..but some people go for that kinda thing ^_^
_____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL