Error403Forbidden Posted March 2, 2018 Share Posted March 2, 2018 Hello! I am wanting to make a portrait that changes from one texture to another when a very CERTAIN avatar is near by. Is this possible? If so, how !? Thank you! Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 2, 2018 Share Posted March 2, 2018 (edited) 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 March 2, 2018 by Rolig Loon 1 Link to comment Share on other sites More sharing options...
Scaler Rexen Posted March 2, 2018 Share Posted March 2, 2018 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 More sharing options...
Wulfie Reanimator Posted March 6, 2018 Share Posted March 6, 2018 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. 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 6, 2018 Share Posted March 6, 2018 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. Link to comment Share on other sites More sharing options...
Love Zhaoying Posted March 6, 2018 Share Posted March 6, 2018 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 More sharing options...
Recommended Posts
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