Jump to content

How do I link one object with another and command one of the objects to control another?


You are about to reply to a thread that has been inactive for 72 days.

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

Recommended Posts

No.  If the controlling prim and the display prim are linked, they are parts of the same object.  You simply need to have the textures in the same prim with the script or, better yet, hard code the UUIDs of the textures in the script so that nobody can later grab the textures out of the object.  If your two objects are not in fact linked, the answer is different.  In that case, the controlling script has to communicate with a separate script in the display prim that actually does the work of changing textures.  The textures (or, again, the texture UUIDs) need to be in the display prim in that case.

Edited by Rolig Loon
typos. as always.
  • Like 1
Link to post
Share on other sites
2 hours ago, IcyMiranda said:

 I would put the script into the object I would want to be the parent object and the textures into the separate controlled object, correct?

If you want a linked controller, you can use llSetLinkTexture to change the textures. Ideally, like Rollig said, you would want to create a list of texture UUIDs, so you don't have to store the actual textures in the prim inventory. You can then loop through the list on touch and use llSetLinkTexture to change the texture and face of your linked texture prim.

I have something not unlike what you want. I put it on my pastebin.  You might need to make some changes, but it's a good starting point.

  • Like 1
Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 72 days.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...