Jump to content

Auto Change Textures When ... Help


Error403Forbidden
 Share

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

You are about to reply to a thread that has been inactive for 2243 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
 Share

×
×
  • Create New...