Jump to content

Auto Change Textures When ... Help


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

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

Recommended Posts

Yes.  script a transparent prim to detect collisions (in a collision_start event) by that specific avatar by name (or UUID).  When detected , execute your texture change routine. I'd suggest setting llVolumeDetect(TRUE) in the state_entry event to make your prim phantom and allow the collision sensor to work in it.

You could do the same thing with a repeating sensor but I don't recommend it.  That sensor will be triggering all the time, wasting server resources and not usually detecting anything.  It's much better to use a static collision sensor.

Edited by Rolig Loon
  • Like 1
Link to post
Share on other sites

Also a cool trick you can do to make it look a lot smoother during the transition place the texture you want it to change to on another prim either invisible (like the collision cube) or on a hidden face so when it does switch it's already loaded in their viewers cache so it'll flip instantly instead of a smudge until it loads.

Link to post
Share on other sites
On 3/2/2018 at 6:18 AM, Rolig Loon said:

Yes.  script a transparent prim to detect collisions (in a collision_start event) by that specific avatar by name (or UUID).  When detected , execute your texture change routine. I'd suggest setting llVolumeDetect(TRUE) in the state_entry event to make your prim phantom and allow the collision sensor to work in it.

You could do the same thing with a repeating sensor but I don't recommend it.  That sensor will be triggering all the time, wasting server resources and not usually detecting anything.  It's much better to use a static collision sensor.

What really matters though, is the definition of "nearby" and the exact use-case. (Volume detect prims might be a bit impractical.)

A third option is to use llGetAgentlist and check if the target avatar is in that list, and possibly the distance of that avatar from the object. This is a better option than sensors and more versatile than collisions. 

  • Like 1
Link to post
Share on other sites
13 minutes ago, Wulfie Reanimator said:

What really matters though, is the definition of "nearby" and the exact use-case. (Volume detect prims might be a bit impractical.)

A third option is to use llGetAgentlist and check if the target avatar is in that list, and possibly the distance of that avatar from the object. This is a better option than sensors and more versatile than collisions.

It's certainly another good option.  It's smart to have several choices in your toolbox.  One size does not fit all cases. 9_9

Link to post
Share on other sites
On 3/2/2018 at 12:12 AM, Scaler Rexen said:

Also a cool trick you can do to make it look a lot smoother during the transition place the texture you want it to change to on another prim either invisible (like the collision cube) or on a hidden face so when it does switch it's already loaded in their viewers cache so it'll flip instantly instead of a smudge until it loads.

I use 2 or more prims and slowly transition between one picture and the other (fader).

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...