0

My question is how can I change parameters from a specific object in LSL. Is there any function to reference a Key (or UUID)? To be more clear, I want to use a function like llSetPrimitiveParams but with a specific reference on a Key (UUID) on my world.

Menelaos Kotsollaris
  • 5,776
  • 9
  • 54
  • 68
  • You want to change some parameters (color,texture,position,etc) of one object from a script in another object? – Highstaker Aug 13 '14 at 05:21
  • I found a way to solve it. As I resulted, you cant reference an object via the UUID (key). In my solution, I linked the objects I wanted to change on several events (on touch etc) and then I used llSetPrimitiveParams. You can handle any object via the first parameter of llSetPrimitiveParams. – Menelaos Kotsollaris Aug 13 '14 at 10:12
  • you mean, llSetLinkPrimitiveParams ? – Highstaker Aug 13 '14 at 11:57
  • in that case you may want to use llSetLinkPrimitiveParamsFast. It's basically the same, but, as the name suggests, it works way faster, especially if you call it many times. Wiki page says that occasionally it may make the order of modifications wrong, but in most cases it is not a big issue. I always use llSetLinkPrimitiveParamsFast and have never encountered any problems. 8) Refer to wiki page for more info http://wiki.secondlife.com/wiki/LlSetPrimitiveParams – Highstaker Aug 13 '14 at 13:47

3 Answers3

2

You're not able to change object parameters outside of a linked-set using only one script.
However, if the object in question is apart of the same linked-set you can use llSetLinkPrimitiveParamsFast to change it's parameters.

jacob
  • 4,656
  • 1
  • 23
  • 32
1

I did wish to write here given I've used LSL for a very long time. The voted comment is also by the original poster which states 'you can not reference any object only giving its UUID' Actually you can do many things without having to actually link them. If you specifically targeted the comment at a unscripted object then thats a given without having something at least control the desired action, linking, script, etc.

  • You can use llSetRemoteScriptAccessPin & llRemoteLoadScriptPin for it to pass a script that sets a object.

  • You can use use the various chat functions ie llWhisper,llSay,llShout,llRegionSay,llRegionSayTo mind that you keep to a negative channel. If you want something a little more secure via wanting chat functions. Think of using llRegionSayTo instead.

  • You may also send data to it through email,http, or even https.

And if you wish two objects to be linked dynamically regardless if they are rezzed over and over. Simply use a website to store the data (or just the new UUID of the object) that either one object fetches or both can fetch. There are also sites devoted to allowing this type (key/value storing, etc). Though, roll your own is easy enough.

So many ways to do the same thing and produce the result wanted. If I've excluded a specific mention of something its because the generalized inclusion was sufficient enough. The LSL Wiki can provide better understanding.

If you want the object to be changed only once then you can set the script to delete once its task is complete. In the case of pins you can set the script to the object when it requires changing, then delete after.

Esoterica
  • 151
  • 1
  • 9
0

In LSL you cant reference any object by only giving its UID. You will need to create a group of objects (link them), and then handle any kind of event in each object you want via llSetLinkPrimitiveParamsFast. That did the job for me.

Menelaos Kotsollaris
  • 5,776
  • 9
  • 54
  • 68