JackRipper666 Posted April 23, 2018 Share Posted April 23, 2018 Hi, I'm trying to understand how to best use a note card to change textures on an object. Example something that if I put say 5 texture names in the note card and say a notecard reader script reads those names in the notecard but takes the UUID of those textures and passes it along to a function like llSetLinkTexture. Then I'd just enter a chat command and it would apply those textures with the same function to the object they're in. If that makes sense to someone anyone know how to do this? lol Link to comment Share on other sites More sharing options...
Xiija Posted April 23, 2018 Share Posted April 23, 2018 http://wiki.secondlife.com/wiki/LlGetNotecardLine if it's only 5, and if they never change, just hard code them into yer script mebbe? 2 Link to comment Share on other sites More sharing options...
Rolig Loon Posted April 23, 2018 Share Posted April 23, 2018 You've already figured out the logic pretty well. As you said, simply put the texture names and UUIDs in the notecard, and read them in with a dataserver event. You could store the information in a single strided list or in two parallel lists, whichever is more convenient for you. Then use a dialog to select the one you want to display at any given time. As Xijia says, you don't really need to read the information from a notecard at all if you are always going to use the same selection of textures. The notecard approach just gives you added flexibility for when you want to use texture UUIDs that are not hard coded into the script. 1 Link to comment Share on other sites More sharing options...
Qie Niangao Posted April 23, 2018 Share Posted April 23, 2018 An advantage of keeping the UUIDs in the script is that they'll have the permissions you assign to the script. With a notecard, if your script can read it, another script can too. Some commercial products encrypt UUIDs in notecards, but that adds a lot of overhead work to using notecard storage and is only as secure as the encryption secret. (Admittedly, this is all kind of silly now because most textures are completely useless except on the model with a matching UV map, so they could as well be public for all it really matters, but that goes against the instincts of many creators.) 1 Link to comment Share on other sites More sharing options...
Edie Shoreland Posted April 23, 2018 Share Posted April 23, 2018 (edited) 12 hours ago, Xiija said: http://wiki.secondlife.com/wiki/LlGetNotecardLine if it's only 5, and if they never change, just hard code them into yer script mebbe? The notecard method makes sense for an applier, where other creators will be creating notecards with their own unique textures, and you don't want other texture creators to have access to your script . If there's no third party creators, and you just want the end user to be able to choose from 5 preset textures, Xiija's solution makes a lot more sense. A list of 5 keys in the script itself is going to do things a lot faster, and with fewer headaches, than making a simple texture change a database event. Edited April 23, 2018 by Edie Shoreland 1 Link to comment Share on other sites More sharing options...
JackRipper666 Posted April 23, 2018 Author Share Posted April 23, 2018 Thanks for all the replies! Main reason I choose to try a notecard is hoping this might make it easier for others to edit. If I manage to finish a 3d model I'm working on I think it will add ease of use to upload and add textures by name to a notecard and have a script do the harder part of assigning their textures to where I want them to go on a model. So I think in a sense it is the same as an applier as Edie said. I'm not very familiar with appliers or programming so most of what I come up with is luck at times lol! Link to comment Share on other sites More sharing options...
CrocTechnologies Posted May 6, 2018 Share Posted May 6, 2018 I have the answer!! Link to comment Share on other sites More sharing options...
Rolig Loon Posted May 6, 2018 Share Posted May 6, 2018 29 minutes ago, CrocTechnologies said: I have the answer!! That's handy. 1 Link to comment Share on other sites More sharing options...
System32jos Posted October 12, 2020 Share Posted October 12, 2020 that this post is old but it would not be easier to add the channel with the UUID in a gesture on chat and when activating the gesture in the chat the 5 textures are changed Link to comment Share on other sites More sharing options...
Rolig Loon Posted October 12, 2020 Share Posted October 12, 2020 3 minutes ago, System32jos said: but it would not be easier to add the channel with the UUID in a gesture on chat and when activating the gesture in the chat the 5 textures are changed Perhaps, but as both Xijia and Qie pointed out in this old thread, any method like that leaves the textures or their UUIDs vulnerable to theft. If you know that there will only be a half dozen textures to change, it makes more sense to hard code them into a list in the script and then use a menu to give users the option to chose among them. That's easier for the user, who doesn't have to keep track of a separate notecard or a gesture, and it protects the permissions on your textures. Link to comment Share on other sites More sharing options...
System32jos Posted October 12, 2020 Share Posted October 12, 2020 you can only protect UUIDs if you put them inside a script I have a receiver and launcher script if they can improve it they can add 5 uuid and with this protect their UUID if they cannot improve it, create a HUD where each HUD cube will send the UUID to the selected channel and it will simply change this script does not work because it changes a complete object OBJETO RECEPTOR integer ch=1000; default{ state_entry() { llListen(ch,"",NULL_KEY,""); } listen(integer channel, string name, key id, string msg) { if (llGetOwner() == llGetOwnerKey(id)) { llSetTexture(llGetSubString(msg,0,-1),ALL_SIDES); } } } HUD LANZADOR integer ch=1000; default{ touch_start(integer total_number) { llSay(ch,"UUID"); } } I hope this post helps 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