Jump to content

arisaie

Resident
  • Posts

    86
  • Joined

  • Last visited

Everything posted by arisaie

  1. You made it look simple, Quistess. I need a lot more to learn. Thanks.
  2. Hi Is it possible to set up multiple timers for multiple animations? Or do all animations need to be same lenght? I would like my animesh to cycle through animations but having issues with timing. I can set it up to cycle but only with one timer ex. (integer interval = 3). The animesh needs llStopObjectAnimation() or the next animation wont play. Is there a way to set llStopObjectAnimation for multiple animations with different animation lenghts? Thanks
  3. Thanks. Will keep that in mind!
  4. I would like to create mesh rain as part of something bigger but would like to ask how to go about it. I have seen mesh rain somewhere but I cant find the place anymore. Mesh rain instead of particles as I want it to not clip under another mesh. I would like it to be max 1000 verts (maybe lower if possible). Do I just create planes in blender and unwrap them? Then use llSetTextureAnim to animate the rain? I think I saw somewhere that the llSetTextureAnim only works from left to right. Do I unwrap the planes from left to right(left being top and right being bottom) and create the texture for the rain drops? Maybe overlap 6 different UV islands, randomised and scale them so the rain is not uniform when animated? Thanks!
  5. Thank you for taking the time to show it. I made it work
  6. Does anyone have any experience with tattoos making in substance painter? The problem I have: The head/body has a standard material. I used the shader which supports opacity and made the head/body material completely transparent. The problem is, when I import a texture which has the tattoo in black and transparent background, the transparent background on the image makes the layer under opaque. For example its a 2kx2k texture black on transparent...this creates a visible square of the layer below. The tattoo is visible, but so is the body where the tattoo texture is. I have also tried painting it, it works but even at 2k resolution it creates white bleeding around my strokes. Does anyone have any idea how to make tattoos work in SP and how to export them? Or its necessary to use photoshop to fix the transparency? Thanks!
  7. I was wondering about how others fix peeking nipples when making female mesh clothing. Do you move the mesh over so it hides the nipples or do you utilise autohide? Which is a better practice? Which do you prefer as an user?
  8. Is there a reason why the the anim on my main start a few milliseconds later than the same animations on my alts start at the same time? It's a scripted object, the objects are the same in all 3 instances..the animations are exactly the same. Does SIM lag or something hasto do with it? I tested it on different beta grid Sims and it's the same I touch the object to start playing but on my main the animation is slightly delayed while alts are in sync Anyone knows why is this happening?
  9. I have 5 animations that I want the owner to be able to share with other avatars on the same sim. My idea is to have a controller object that the owner attaches and if they chose to, they can press the HUD botton or provided gesture. This will make a sphere above their head visible and other avatars can touch it to get the animations. There is also 2 objects - 1 for each hand (which will have a script for color change and possibly particles). The HUD will have buttons to play individual animations and color change. What would be the best way to share the animations? I thought I would give the HUD (no mod, no transfer) to other avatars directly from the inventory upon touch. The HUD would have all functionality as the owners original but would detect teleport with CHANGED_REGION. CHANGED_REGION will trigger llStopAnimation + llRemoveInventory (to remove the script and the animations) + will change the HUD texture to something like "You have left the person who shared animations with you. The HUD functionality has been disabled". I would also possibly llSetTimerEvent to an hour to do the same thing. Is 3600 seconds possible? I would also like the shared HUD to be no copy but... llGiveInventory wiki says "If inventory is no-copy it is transfered to destination without copying it. Since it is no-copy the only copy is given to destination; removing it from the source prim's inventory." How would I go about setting the shared HUD to be no copy? Would this be a good way to go about it or is there a better way? Thanks!
  10. So I was trying to create I'd say a simple animation..but I had to turn off rotation limits in certain bones . I tweaked it slightly back with the constrains, but it still not looking like I'd want it to. Is there any other way to fix the rogue rotations(clavicle, upper shoulder stretching/rolling) ?
  11. Ooook...so after trying different algorhitms and trying to understand why pixels are so damn big I came to a conclusion that the best way is to create a texture pattern as all three of you said and overlay the UVs after. The texture stretches indifinetely and its possible to move the UVs around outside the 1 -1 UV space. I managed to create an OK texture like like this. Thanks Fluffy, ChinRey and Wulfie, all your information were certainly informative!
  12. Yes exactly ChinRey. I meant a surface covered in leaves. Thank you for your detailed explanation. I intend to add autumn(leaves fallen on surface) and winter(snow cover on surface) option to my mesh. Just a few of the leaves scattered around the mesh and the ground. The problem is with the baked resolution of the leaves. Your example looks much better. Here is a picture of how I would imagine it. (theres more above) This is done with blender geometry nodes where planes are scattered across my mesh. Each plane uses the same material - 256x256 pixel image of a leaf. The problem with this it adds up to more than 1400 vertices. And I had to make LOD1 and LOD0 to a single triangle otherwise the LI goes to 3.8. This is the closeup of leaves on individual planes. And this is how the baked texture looks if I bake the individual leaves to a singular plane in blender. With this option I would only really need about 6 or 7 planes (49 or sovertices total) I baked this to a 2048x2048 texture, using a 2k texture of the leaf, yet it turns out completely pixalated. You could hardly tell its a leaf without context (unlike with your examples, you can tell its leaves and vines). I went with the baking route because I am not at all proficient in graphics software like photoshop(and I think I googled it and its not possible to randomly scatter objects on the texture with photoshop). Even if I stretch the UV island to bounds inblender and bake it like that it turns out pixalated. It certainly is not as sharp as the 256x256 texture on a lot of planes like on 2nd picture. I am not using lightning at all (which seems to pixalate results in blender bake) ..only baking DIFFUSE - COLOR. Did you texture your example in a graphics software or baked it? I feel like I will go with the first option (scattered planes)..maybe tune down the amount of leaves. The med->low distance is 46m, so I can make LOD1 and LOD0 a single triangle (doesnt need to be visible at this distance). It is 1LI this way too. The problem would be if someone wants to make the mesh larger and in that case it would be 2LI for just the leaves. I dont know why I am so inclined to make the LI as lowest as possible.
  13. I'm currently trying to make autumn leaves that are on top of my mesh. I did the rand position on surface in blender with geometry nodes. It adz around 1400 vertices . I thought well that's not much.. just nuke LOd1 and LOD0 on upload. As long it's around1LI then it's OK right? Then I got the idea to just use planes and bake the leaves to planes. But this is the problem when I bake the leaves onto the plane , the result is very pixelated. Like you wouldn't even recognize it's a leave. I tried upscaling the bake texture to 4k...upscaled my leave image to 2k..but after baking it's still very much pixelated. My plane UV islands are correct sizes (according to texel density) Any idea how I could bake the leaves into the substitute plane and get a sharp image? I'm also baking only diffuse color without any light lighting (it's turned off) Or should I just use the physical geometry nodes result? Sure it's a lot of faces but the 256x256 texture will be used on all faces. And the 256x256 texture looks good
  14. Is there a neat tip or trick on how to properly unwrapp bust area ? The thing is with UV checker map it looks OK on 2d flat...but when imported inworld the bust area is stretched Does it have to do with the UV islands? When unwrapped the bust area faces are smaller than faces around it. So if triangles/faces are squished close together and get smaller it results in texture stretching , right?
  15. Never heard of the term garbage collector! Thanks, I was wondering and meant to ask what exactly adds to the memory and increases it.
  16. Thank you primerib! It took me a while but managed to make it work. Without your examples I dont think I would be able to figure it out. I certainly learned new things. I did the GLOW the same way and all selections can be selected interchargeably. Even the script memory dropped by 10 000 bytes. Thanks a lot! Thanks wulfie. If only I remembered about the llList2CSV! I removed it and have not used it again.
  17. Added the code in reply as it was freezing my view. SOme integers are not used and llSetTimerEvent() is for color cycle settigngs which is not done yet integer dChannel; integer lHandle; key id; list pattern = [<1.0, 1.0, 1.0>, <1.0, 0.0, 0.498>, <0.929, 0.635, 0.337>]; float interval = 0.2; integer color_index; integer prim = LINK_SET; integer face = ALL_SIDES; list glow_index = []; default { changed(integer change) { if(change & (CHANGED_OWNER | CHANGED_INVENTORY)) { llResetScript(); } } state_entry() { dChannel = 1; id = llDetectedKey(0); lHandle = llListen(dChannel, "", "", ""); } listen(integer channel, string size, key id, string message) { list descriptionS = ["1"]; list descriptionM = ["2"]; list descriptionL = ["3"]; string stringDescriptionS = llList2String(descriptionS, 0); integer iDescriptionS = llList2Integer(descriptionS, 0); string stringDescriptionM = llList2String(descriptionM, 0); integer iDescriptionM = llList2Integer(descriptionM, 0); string stringDescriptionL = llList2String(descriptionL, 0); integer iDescriptionL = llList2Integer(descriptionL, 0); list isLength1 = llGetLinkPrimitiveParams(4, [PRIM_DESC]); integer iIsLength1 = llList2Integer(isLength1, 0); list isLength2 = llGetLinkPrimitiveParams(6, [PRIM_DESC]); integer iIsLength2 = llList2Integer(isLength2, 0); list isLength3 = llGetLinkPrimitiveParams(8, [PRIM_DESC]); integer iIsLength3 = llList2Integer(isLength3, 0); list listLength = llGetLinkPrimitiveParams(1, [PRIM_DESC]); string listLen = llList2String(listLength, 0); //BELOW IS THE DISPLAY list hidden = llGetLinkPrimitiveParams(3, [PRIM_DESC, PRIM_LINK_TARGET, 5, PRIM_DESC, PRIM_LINK_TARGET, 7, PRIM_DESC, PRIM_LINK_TARGET, 9, PRIM_DESC, PRIM_LINK_TARGET, 11, PRIM_DESC]); string CSV = llList2CSV(hidden); float SH23 = llList2Float(hidden, 0); float SH45 = llList2Float(hidden, 1); float SH67 = llList2Float(hidden, 2); float SH89 = llList2Float(hidden, 3); float SH1011 = llList2Float(hidden, 4); // integer integerHidden = llString2Integer(CSV, 0); // list descS = ["1", "2", "3"]; // string descriptionShort = llList2CSV(descS) ; // list descM= ["2", "1", "3"]; // string descriptionMedium = llList2CSV(descM); // list descL= ["3", "1", "2"]; // string iDescriptionMong = llList2CSV(descL); // list desclist = llCSV2List(listLen); // integer iDescriptionS = llList2Integer(desclist, 0); // integer iDescriptionM = llList2Integer(desclist, 1); // integer iDescriptionL = llList2Integer(desclist, 2); //----------------------------END OF DISPLAY list listGlow = llGetLinkPrimitiveParams(2, [PRIM_DESC]); float glow = llList2Float(listGlow, 0); vector color = llList2Vector(llGetLinkPrimitiveParams(1, [PRIM_COLOR, ALL_SIDES]), 0); if(message == "stat") llSay(0, (string)SH23 + " " +(string)SH45 + " " +(string)SH67 + " " + (string)SH1011); //WHITE-------------------------------- if (message == "KWColWhite") { llSetLinkPrimitiveParamsFast(2, [PRIM_COLOR, iIsLength1, <1.0, 1.0, 1.0>, SH23, // MAIN FACE PRIM_LINK_TARGET, 3, PRIM_COLOR, iIsLength1, <1.0, 1.0, 1.0>, SH23, PRIM_LINK_TARGET, 4, PRIM_COLOR, iIsLength1, <1.0, 1.0, 1.0>, SH45, PRIM_LINK_TARGET, 5, PRIM_COLOR, iIsLength1, <1.0, 1.0, 1.0>, SH45, PRIM_LINK_TARGET, 6, PRIM_COLOR, iIsLength1, <1.0, 1.0, 1.0>, SH67, PRIM_LINK_TARGET, 7, PRIM_COLOR, iIsLength1, <1.0, 1.0, 1.0>, SH67, PRIM_LINK_TARGET, 8, PRIM_COLOR, iIsLength1, <1.0, 1.0, 1.0>, SH89, PRIM_LINK_TARGET, 9, PRIM_COLOR, iIsLength1, <1.0, 1.0, 1.0>, SH89, PRIM_LINK_TARGET, 10, PRIM_COLOR, iIsLength1, <1.0, 1.0, 1.0>, SH1011, PRIM_LINK_TARGET, 11, PRIM_COLOR, iIsLength1, <1.0, 1.0, 1.0>, SH1011, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength2, <1.0, 1.0, 1.0>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength3, <1.0, 1.0, 1.0>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, 0, <1.0, 1.0, 1.0>, 0.0, //BASE COLOR PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, //BASE GLOW PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, 0.0,//ROOT COLOR PRIM_LINK_TARGET, 1, PRIM_GLOW, 0, 0.0]); //ROOT GLOW llSetTimerEvent(0); } //RED--------------------------------------------------------------------- if (message == "KWColRed") { llSetLinkPrimitiveParamsFast(2, [PRIM_COLOR, iIsLength1, <1.0, 0.0, 0.498>, SH23, // MAIN FACE PRIM_LINK_TARGET, 3, PRIM_COLOR, iIsLength1, <1.0, 0.0, 0.498>, SH23, PRIM_LINK_TARGET, 4, PRIM_COLOR, iIsLength1, <1.0, 0.0, 0.498>, SH45, PRIM_LINK_TARGET, 5, PRIM_COLOR, iIsLength1, <1.0, 0.0, 0.498>, SH45, PRIM_LINK_TARGET, 6, PRIM_COLOR, iIsLength1, <1.0, 0.0, 0.498>, SH67, PRIM_LINK_TARGET, 7, PRIM_COLOR, iIsLength1, <1.0, 0.0, 0.498>, SH67, PRIM_LINK_TARGET, 8, PRIM_COLOR, iIsLength1, <1.0, 0.0, 0.498>, SH89, PRIM_LINK_TARGET, 9, PRIM_COLOR, iIsLength1, <1.0, 0.0, 0.498>, SH89, PRIM_LINK_TARGET, 10, PRIM_COLOR, iIsLength1, <1.0, 0.0, 0.498>, SH1011, PRIM_LINK_TARGET, 11, PRIM_COLOR, iIsLength1, <1.0, 0.0, 0.498>, SH1011, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength2, <1.0, 0.0, 0.498>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength3, <1.0, 0.0, 0.498>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, 0, <1.0, 0.0, 0.498>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, <1.0, 0.0, 0.498>, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, 0, 0.0]); llSetTimerEvent(0); } //ORANGE--------------------------------------------------------------------- if (message == "KWColOrange") { llSetLinkPrimitiveParamsFast(LINK_SET,[ PRIM_COLOR, iIsLength1, <0.929, 0.635, 0.337>, 1.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength2, <0.929, 0.635, 0.337>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength3, <0.929, 0.635, 0.337>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, 0, <0.929, 0.635, 0.337>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, <0.929, 0.635, 0.337>, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, 0, 0.0]); llSetTimerEvent(0); } //YE3OW--------------------------------------------------------------------- if (message == "KWColYellow") { llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_COLOR, iIsLength1, <0.929, 0.929, 0.388>, 1.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength2, <0.929, 0.929, 0.388>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength3, <0.929, 0.929, 0.388>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, 0, <0.929, 0.929, 0.388>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, <0.929, 0.929, 0.388>, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, 0, 0.0]); llSetTimerEvent(0); } //Green--------------------------------------------------------------------- if (message == "KWColGreen") { llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_COLOR, iIsLength1, <0.365, 1.000, 0.365>, 1.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength2, <0.365, 1.000, 0.365>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength3, <0.365, 1.000, 0.365>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, 0, <0.365, 1.000, 0.365>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, <0.365, 1.000, 0.365> , 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, 0, 0.0]); llSetTimerEvent(0); } //Torqiose--------------------------------------------------------------------- if (message == "KWColTorquise") { llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_COLOR, iIsLength1, <0.467, 0.929, 0.929>, 1.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength2, <0.467, 0.929, 0.929>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength3, <0.467, 0.929, 0.929>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, 0, <0.467, 0.929, 0.929>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, <0.467, 0.929, 0.929>, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, 0, 0.0]); llSetTimerEvent(0); } //Blue--------------------------------------------------------------------- if (message == "KWColBlue") { llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_COLOR, iIsLength1, <0.192, 0.596, 1.000>, 1.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength2, <0.192, 0.596, 1.000>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength3, <0.192, 0.596, 1.000>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, 0, <0.192, 0.596, 1.000>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, <0.192, 0.596, 1.000>, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, 0, 0.0]); llSetTimerEvent(0); } //Purple--------------------------------------------------------------------- if (message == "KWColPurple") { llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_COLOR, iIsLength1, <0.647, 0.294, 1.000>, 1.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength2, <0.647, 0.294, 1.000>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength3, <0.647, 0.294, 1.000>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, 0, <0.647, 0.294, 1.000>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, <0.647, 0.294, 1.000>, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, 0, 0.0]); llSetTimerEvent(0); } //Pink--------------------------------------------------------------------- if (message == "KWColPink") { llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_COLOR, iIsLength1, <0.996, 0.325, 1.000>, 1.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength2, <0.996, 0.325, 1.000>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength3, <0.996, 0.325, 1.000>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, 0, <0.996, 0.325, 1.000>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, <0.996, 0.325, 1.000>, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, 0, 0.0]); llSetTimerEvent(0); } //Black--------------------------------------------------------------------- if (message == "KWColBlack") { llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_COLOR, iIsLength1, <0.0, 0.0, 0.000>, 1.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength2, <0.0, 0.0, 0.000>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iIsLength3, <0.0, 0.0, 0.000>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, 0, <0.0, 0.0, 0.000>, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, <0.0, 0.0, 0.000>, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, 0, 0.0]); llSetTimerEvent(0); } //GLOW-------------------------------------------------------------------- if (message == "KWGlow5") { llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_GLOW, iIsLength1, 0.05, //ACTIVE FACE PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, //BASE PRIM_LINK_TARGET, 1, PRIM_GLOW, ALL_SIDES, 0.00, //ORIGIN PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iIsLength2, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iIsLength3, 0.0, PRIM_LINK_TARGET, 2, PRIM_DESC, "0.05"]); //GLOW STRENGTH DESC } if (message == "KWGlow10") { llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_GLOW, iIsLength1, 0.1, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, ALL_SIDES, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iIsLength2, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iIsLength3, 0.0, PRIM_LINK_TARGET, 2, PRIM_DESC, "0.1"]); } if (message == "KWGlow20") { llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_GLOW, iIsLength1, 0.2, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, ALL_SIDES, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iIsLength2, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iIsLength3, 0.0, PRIM_LINK_TARGET, 2, PRIM_DESC, "0.2"]); } if (message == "KWGlow30") { llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_GLOW, iIsLength1, 0.3, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, ALL_SIDES, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iIsLength2, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iIsLength3, 0.0, PRIM_LINK_TARGET, 2, PRIM_DESC, "0.3"]); } if (message == "KWGlowOFF") { llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_GLOW, iIsLength1, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, 0, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, ALL_SIDES, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iIsLength2, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iIsLength3, 0.0, PRIM_LINK_TARGET, 2, PRIM_DESC, "0.0"]); } //LENGTH--------------------------------------------------------------------- if (message == "KWLenShort") { llSetLinkPrimitiveParamsFast(4, [PRIM_DESC, stringDescriptionS, PRIM_LINK_TARGET, 6, PRIM_DESC, stringDescriptionM, PRIM_LINK_TARGET, 8, PRIM_DESC, stringDescriptionL]); llSetLinkPrimitiveParams(LINK_SET, [PRIM_COLOR, 0, color, 0.0, //BASE PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iDescriptionS, color, 1.0,//SHOW PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iDescriptionM, color, 0.0,//HIDE PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iDescriptionL, color, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iDescriptionS, glow,//GLOW ACTIVE PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iDescriptionM, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iDescriptionL, 0.0, PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, color, 0.0,//ROOT COLOR PRIM_LINK_TARGET, 1, PRIM_GLOW, ALL_SIDES, 0.0]); //ROOT } //MEDIUM if (message == "KWLenMedium") { llSetLinkPrimitiveParamsFast(4, [PRIM_DESC, stringDescriptionM, PRIM_LINK_TARGET, 6, PRIM_DESC, stringDescriptionS, PRIM_LINK_TARGET, 8, PRIM_DESC, stringDescriptionL]); llSetLinkPrimitiveParamsFast(LINK_SET, [PRIM_COLOR, 0, color, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iDescriptionM, color, 1.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iDescriptionS, color, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iDescriptionL, color, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iDescriptionM, glow, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iDescriptionS, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iDescriptionL, 0.0, PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, color, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, ALL_SIDES, 0.0]); } //LONG if (message == "KWLenLong") { llSetLinkPrimitiveParamsFast(4, [PRIM_DESC, stringDescriptionL, PRIM_LINK_TARGET, 6, PRIM_DESC, stringDescriptionS, PRIM_LINK_TARGET, 8, PRIM_DESC, stringDescriptionM]); llSetLinkPrimitiveParamsFast(LINK_SET, [PRIM_COLOR, 0, color, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iDescriptionL, color, 1.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iDescriptionS, color, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_COLOR, iDescriptionM, color, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iDescriptionL, glow, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iDescriptionS, 0.0, PRIM_LINK_TARGET, LINK_SET, PRIM_GLOW, iDescriptionM, 0.0, PRIM_LINK_TARGET, 1, PRIM_COLOR, ALL_SIDES, color, 0.0, PRIM_LINK_TARGET, 1, PRIM_GLOW, ALL_SIDES, 0.0]); } //DISPLAY------------------------------------------------------------------------- list isHidden = ["0.0"]; list isShown = ["1.0"]; string sHidden = llList2String(isHidden, 0); string sShown = llList2String(isShown, 0); if (message == "KWDisplayHide1") { llSetLinkPrimitiveParamsFast(2, [PRIM_COLOR, iIsLength1, color, 0.0, PRIM_LINK_TARGET, 2, PRIM_GLOW, iIsLength1, 0.0, PRIM_LINK_TARGET, 3, PRIM_COLOR, iIsLength1, color, 0.0, PRIM_LINK_TARGET, 3, PRIM_GLOW, iIsLength1, 0.0, PRIM_LINK_TARGET, 3, PRIM_DESC, sHidden]); } if (message == "KWDisplayShow1") { llSetLinkPrimitiveParamsFast(2, [PRIM_COLOR, iIsLength1, color, 1.0, PRIM_LINK_TARGET, 2, PRIM_GLOW, iIsLength1, glow , PRIM_LINK_TARGET, 3, PRIM_COLOR, iIsLength1, color, 1.0, PRIM_LINK_TARGET, 3, PRIM_GLOW, iIsLength1, glow, PRIM_LINK_TARGET, 3, PRIM_DESC, sShown]); } if (message == "KWDisplayHide2") { llSetLinkPrimitiveParamsFast(4, [PRIM_COLOR, iIsLength1, color, 0.0, PRIM_LINK_TARGET, 4, PRIM_GLOW, iIsLength1, 0.0, PRIM_LINK_TARGET, 5, PRIM_COLOR, iIsLength1, color, 0.0, PRIM_LINK_TARGET, 5, PRIM_GLOW, iIsLength1, 0.0, PRIM_LINK_TARGET, 5, PRIM_DESC, sHidden]); } if (message == "KWDisplayShow2") { llSetLinkPrimitiveParamsFast(4, [PRIM_COLOR, iIsLength1, color, 1.0, PRIM_LINK_TARGET, 4, PRIM_GLOW, iIsLength1, glow , PRIM_LINK_TARGET, 5, PRIM_COLOR, iIsLength1, color, 1.0, PRIM_LINK_TARGET, 5, PRIM_GLOW, iIsLength1, glow, PRIM_LINK_TARGET, 5, PRIM_DESC, sShown]); } if (message == "KWDisplayHide3") { llSetLinkPrimitiveParamsFast(6, [PRIM_COLOR, iIsLength1, color, 0.0, PRIM_LINK_TARGET, 6, PRIM_GLOW, iIsLength1, 0.0, PRIM_LINK_TARGET, 7, PRIM_COLOR, iIsLength1, color, 0.0, PRIM_LINK_TARGET, 7, PRIM_GLOW, iIsLength1, 0.0, PRIM_LINK_TARGET, 7, PRIM_DESC, sHidden]); } if (message == "KWDisplayShow3") { llSetLinkPrimitiveParamsFast(6, [PRIM_COLOR, iIsLength1, color, 1.0, PRIM_LINK_TARGET, 6, PRIM_GLOW, iIsLength1, glow , PRIM_LINK_TARGET, 7, PRIM_COLOR, iIsLength1, color, 1.0, PRIM_LINK_TARGET, 7, PRIM_GLOW, iIsLength1, glow, PRIM_LINK_TARGET, 7, PRIM_DESC, sShown]); } if (message == "KWDisplayHide4") { llSetLinkPrimitiveParamsFast(8, [PRIM_COLOR, iIsLength1, color, 0.0, PRIM_LINK_TARGET, 8, PRIM_GLOW, iIsLength1, 0.0, PRIM_LINK_TARGET, 9, PRIM_COLOR, iIsLength1, color, 0.0, PRIM_LINK_TARGET, 9, PRIM_GLOW, iIsLength1, 0.0, PRIM_LINK_TARGET, 9, PRIM_DESC, sHidden]); } if (message == "KWDisplayShow4") { llSetLinkPrimitiveParamsFast(8, [PRIM_COLOR, iIsLength1, color, 1.0, PRIM_LINK_TARGET, 8, PRIM_GLOW, iIsLength1, glow , PRIM_LINK_TARGET, 9, PRIM_COLOR, iIsLength1, color, 1.0, PRIM_LINK_TARGET, 9, PRIM_GLOW, iIsLength1, glow, PRIM_LINK_TARGET, 9, PRIM_DESC, sShown]); } if (message == "KWDisplayHide5") { llSetLinkPrimitiveParamsFast(10, [PRIM_COLOR, iIsLength1, color, 0.0, PRIM_LINK_TARGET, 10, PRIM_GLOW, iIsLength1, 0.0, PRIM_LINK_TARGET, 11, PRIM_COLOR, iIsLength1, color, 0.0, PRIM_LINK_TARGET, 11, PRIM_GLOW, iIsLength1, 0.0, PRIM_LINK_TARGET, 11, PRIM_DESC, sHidden]); } if (message == "KWDisplayShow5") { llSetLinkPrimitiveParamsFast(10, [PRIM_COLOR, iIsLength1, color, 1.0, PRIM_LINK_TARGET, 10, PRIM_GLOW, iIsLength1, glow , PRIM_LINK_TARGET, 11, PRIM_COLOR, iIsLength1, color, 1.0, PRIM_LINK_TARGET, 11, PRIM_GLOW, iIsLength1, glow, PRIM_LINK_TARGET, 11, PRIM_DESC, sShown]); } //------------------------------------------------------------------------- if (message == "mem") { integer used_memory = llGetUsedMemory(); integer free_memory = llGetFreeMemory(); llOwnerSay((string)used_memory + " bytes of memory currently used." + (string)free_memory + " free memory"); } } }
  18. I am working on a script for my HUD, and finally figured out (I hope) how to use lists for storing data. Before that I was using a bunch of if statements [if (message == "" && string == "")] but that was using a lot of script memory (according to llGetUsedMemory()), so I thought..I cant use that. Well, I was done with the 3 main HUD options (COLOR, GLOW, LENGTH, using around 30 000 bytes of script memory) and I figured out how to save the data so the options can be clicked interchargeably - showing and hiding faces (length), applying glow only on shown faces, hiding glow on hidden faces. But then I got to the 4th option (DISPLAY - displaying and hiding a pair of 5 pairs total) and again I am going to run out of script memory if I continue. I included the integers and strings I am not using and the notes I have to keep track of some statements. At first I wanted to use the llList2CSV for descriptions (Lengths- short , medium, long) list descS = ["1", "2", "3"] but integer iDescriptionS = llList2Integer(desclist,1) and index 2 were returning 0 so I kind of bypassed it with the lists and integers and strings (just below listen event) and it worked it seems. I dont know why the llList2CSV works with the floats for the DISPLAY . As you can see in the COLOR (White and red only) section, I used the DISPLAY floats for alpha in PRIM_COLOR, to keep track of which pair is shown or hidden (Pairs LINK 2-3, 4-5,....10-11, LINK 1 is the ROOT PRIM). Without this, if I hid a pair and changed the color, it would become visible. But this additional 9 rows of PRIM_LINK_TARGET adds around 1 000B of memory per color (at least according to llGetUSedMemory()). I would have to add similar lines to keep track of which pair is shown or hidden to GLOW and LENGTH too (otherwise they all get shown when click in the HUD). Is there any way how to fix this, or am I worrying about nothing? The only way I could bypass it, is to make do with it and just letting the user SHOW or HIDE the pair last after setting the previous options... or making a button to delete the script after using the HUD and being satisfied with the settings(which I propably will do anyway) I hope I am making sense and this question is not very demanding and the answer too complex for wonderful help that is provided here...I am learning as I go. If it's above the help provided here (justified) I guess I'll have to look for an experienced scripter. I just like to figure out things myself and learn. I included the picture of my HUD layout.
  19. From my noob testing I noticed that if I replace multiple singular lines of llSetLinkParams Into 1 with Prim link target, it's increases the remaining free memory. I have one more question regarding scripts in general if you don't mind. Should I aim to compile my scrips with lsl2 I stead of mono if possible? I tried switching script from Mono to lsl2 and the difference was that lsl2 cript used 0.0005something of memory. Mono used 0.007 something. I'd guess that less is better regarding SIM resources. 1 more question..should I generally use llSetMemoryLimit if my script is done? And set it to a value around my current memory usage? Does a ascript with no memory limit use all its available resources?
  20. That seems to work! Also...TIL about PRIM_LINK_TARGET. Thank you!
  21. Changing. Value each call? Shouldn't the llGetLocalPos() + my offset fix that? You moved it once, the local position changaed, so the next command should move it again? But it doesn't. If I use ..primparmasfast on link 1 (root) it works intended as I want it to. Each click makgea the whole linkset move in desired location So I'm at loss why it doesn't work the same on links above 1 ,
  22. I have some issues trying to figure out how to use llSetLinkPrimitiveParamsFast([PRIM_POSITION]) with an attachment linkset. I want to be able to move opposing objects(links) in opposing directions with a HUD. -> <- Button makes the links come together, <- -> button separates the link objects. I have been testing it on cubes (2 - 1 - 3 link numbers --1 being the root prim). With 1 instead 0.01 so I can see it better. I have managed to make it change position, but it only happens once with each command. integer dChannel = 0; default { state_entry() { integer lHandle = llListen(0, "", "", ""); } listen(integer channel, string name, key id, string message) { vector offset = <0.0, 1, 0.0>; vector localpos = llGetLocalPos(); vector moved = llGetPos() - offset; vector movedc = localpos + offset; if (message == "l") { llSetLinkPrimitiveParamsFast(2, [PRIM_POSITION, offset]); } if (message == "c") { llSetLinkPrimitiveParamsFast(2, [PRIM_POSITION, - offset]); } } } If I type "l" it does move, but only once. For my attachment link set, i want to be able to adjust the position multiple times. So if I press <- -> 3 times on my HUD, the links 2 and 3 will go into separate directions 3 times by 0.01 (in script it is 1 so I can see it better) if I type "l" it moves on Y axis, but only once, any subsequent "l" command wont move it. Only typing "c" it will move it back. I have tried llGetLocalPos(), llGetPos(), PRIM_POS_LOCAL, PRIM_POSITION, some of which do not move the prims at all, but I can not figure it out. If i set the link number to 1, it moves repeatedly by each command. Any idea what I am missing? Thank you!
  23. I'm trying to make a script for my HUD but the belnder material- face sl is all over the place. I assumed that the arterials I assigned in blender (12345) would become (01234) faces in SL. Apparently it doesn't for me The HUD is made in blender with a that fits all buttons. It's 12 links each link has around 4-7 faces. Even duplicate of the object with same materials and hierarchy gives me random face numbers. Is there a way to make faces follow the materials in blender? I know I change link numbers by rezzing the object -unlink -select in order and linkiz Is it possible for SL to take material hierarchy I'm blender?
×
×
  • Create New...