Jump to content
You are about to reply to a thread that has been inactive for 2810 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Posted

Hi Gurus, 

 

maybe some of you can help me?

 

I have a script that does a lot of things, and I want to give away this script as "modify", so everybody can read it... 

On a certain point in this script, I want to use an UUID and this UUID should not be displayed open. Actually I want to do something like this:
 

llSetTexture("64571f69-8830-c670-c194-cb718ab56286", 2); 

So I had the Idea to put this code into another script wich is "no modify" and call it from my first script. This sounds easy, but somehow I seem to be to stupid to get it work...

 

So what I want is a second script in a prim, and this second script contains a function like

mySecretFunction()  
    {
		llSetTexture("64571f69-8830-c670-c194-cb718ab56286", 2); 
			}

and this function should be called from the first script at a certain point by a call like this:

mySecretFunction();

Can anybody tell me, what is the easiest way to do this?

 

Thanks :) 

 

 

Posted

you can try a linkset message, script a sends a linkset message ands script b runs the 'secret function' when it gets the message, thats a fairly common way of passing data from one script to another or initiating functions in another.
 

  • Like 1
Posted (edited)

If the two scripts are in the same object, then you could trigger the texture change by having the first script use llMessageLinked to send a message to the no-mod script.    The message can contain any arbitrary integer (as its second parameter) or word (as its third parameter), and the no-mod receiving script, in its link_message event  decides what to do about the message, either using  if ... else if ... logic or simply by looking up the code-word or -number in a strided list and seeing what texture it means. 

Edited by Innula Zenovka
  • Like 1
Posted

llMessageLinked is the way to go. Just be aware there is nothing secret about it. A script in the same prim that has the destination script can pick up the full message including prim number, number, message and key

  • Like 1
Posted

But if the receiver script has a strided list of texture names and uuids, the sender can send it the name of the texture to use and the receiver can use that to find the uuid to apply without the texture's uuid ever being exposed (there's other ways to do it, of course).

Posted (edited)

This is good information to have; I've been in the habit of simply having my scripts blurp out and listen to chat commands, this looks way cleaner, saves running unnecessary listening events and all kinds of other bulldoodoo.

To the OP, thanks for asking this, it made it possible for me to read the answers and learn something!

And thanks to the others for answering!

Edited by Berksey
Adding a thank-you.
You are about to reply to a thread that has been inactive for 2810 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...