Jump to content
  • 0

how do you change the texture of one object by touching another object


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

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

Question

  • 0

You need to write at least one script to do that.  The script detects your touch and sends a message to the other object.  If the two objects are linked, the message can simply be a command to change texture.  If they aren't, the message can be a chat command to a second script in the other object that does the actual work of changing the texture.  In either case, it's a simple bit of scripting.

Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

You need to write at least one script to do that.  The script detects your touch and sends a message to the other object.  If the two objects are linked, the message can simply be a command to change texture.  If they aren't, the message can be a chat command to a second script in the other object that does the actual work of changing the texture.  In either case, it's a simple bit of scripting.

Link to post
Share on other sites
  • 0

As I said, it depends on how your object is set up. If it is linked to the other one (the one on which you want to change the texture), all you need to do is include llSetLinkTexture (linknumber,texturename,side) in the touch_start event in your script. That would apply the texture named texturename to the numbered side of the prim that's labelled linknumber. See (http://wiki.secondlife.com/wiki/LlSetLinkTexture). If the other object is NOT linked to yours, then you need to have your touch_start event send a chat message (use llRegionSayTo) that is heard in a listen event in a script in the other object. Use llSetTexture in that second script to do the actual texture change.

Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 3446 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...