Tattooshop
Resident-
Posts
365 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Everything posted by Tattooshop
-
Thanks! Based on the Void Singer script, I made such a two-position pendulum, but can you clarify a bit where in this post the use of SLPPF is indicated? /*//-- USERS MODIFY HERE v --//*/ integer gIntSwing = 30; /*//-- use -# to reverse the direction of swing, eg. -90; --//*/ rotation gRotSwing; default { state_entry() { // Activate the timer listener every 3 seconds llSetTimerEvent(3); gRotSwing = llEuler2Rot( <0.0, 0.0, (float)gIntSwing * DEG_TO_RAD> ); } timer() { llSetLocalRot( (gRotSwing = (ZERO_ROTATION / gRotSwing)) * llGetLocalRot() ); } }
-
Hello there! 🤚 I would like to create a linked pendulum script for an old clock, can I do that with my favorite SLPPF and how? Thank you for any help!
-
What would you recommend on how to fix the problem with the sliders offset from the hud movement? 🖖
-
Thanks a lot! I didn't even hope to finish this project, and I didn't even believe it right away*, but hey, it works! 👍 Special thanks for the texture slider! * Edit: when it started working
-
Thanks again and sorry for continuing to torment you! Well, for example, my HUD sends a message like this llRegionSay(10, "gloss: " + (string) gloss); how can I make the listener recognize which parameter to change? The examples in the wiki are of course very interesting, but how to apply them here? default { state_entry() { llListen(10, "", "", ""); } listen(integer channel, string name, key id, string message) { if (channel != 10) return; //??? } }
-
Thank you! It would be very nice to receive it!
-
And here's another question. Previously, I only had to pass "yes or no" style messages, but here it is from 0 to 255 values, how can I get the listener to perceive such a range and so that the script listener will recognize which value to assign to gloss and which to environment?
-
By the way, as soon as I use PRIM_POS_LOCAL either in that place vector posLink = llList2Vector(llGetLinkPrimitiveParams(llDetectedLinkNumber(0), [PRIM_POSITION]), 0); or that llSetLinkPrimitiveParamsFast(3, [PRIM_POSITION, gPos]); the slider starts working, but when I move HUD, the slider moves off-screen again ... When using PRIM_POSITION both there and there the slider does not seem to move at all ...
-
Thank you so much! I did some tests but the slider doesnt move if I use PRIM_POSITION to get llGetLinkPrimitiveParams. I tried to use PRIM_POS_LOCAL there and then it moves ok, no z axis offsets 👍 ... but then HUD move problem arise. What did I miss? I put full script here: vector gPos; default { touch_start(integer total_number) { if (llDetectedKey(0) != llGetOwner()) return; { string slider = llGetLinkName(llDetectedLinkNumber(0)); { gPos = llDetectedTouchPos(0); vector posLink = llList2Vector(llGetLinkPrimitiveParams(llDetectedLinkNumber(0), [PRIM_POSITION]), 0); gPos.z = posLink.z; // fixes up and down movement; //gPos.x = posLink.x-0.05; // put the slider behind the bar. vector touchUV = llDetectedTouchUV(0); integer gloss = (integer)(touchUV.x * 255); integer envir = (integer)(touchUV.x * 255); if (slider == "gloss_slider_prim") { // using PRIM_POSITION instead of PRIM_POS_LOCAL should fix the problm that happens if you move the HUD. llSetLinkPrimitiveParamsFast(3, [PRIM_POSITION, gPos]); llSay(0, "gloss: " + (string) gloss); } // "else if" is more efficient here: else if (slider == "envir_slider_prim") { llSetLinkPrimitiveParamsFast(2, [PRIM_POSITION, gPos]); llSay(0, "envir: " + (string) envir); } } } } }
-
Thanks a lot! Now the slider moves to almost any position in which I pressed, if the strip is very thin, then it is not very noticeable, and if it is thick, then not very much cute... How to make the slider move only along the X-axis? And I think I broke my HUD, if i change its position the slider goes off-screen ... gPos = llDetectedTouchPos(0); ... if (slider == "gloss_slider_prim") { llSetLinkPrimitiveParamsFast(3, [PRIM_POS_LOCAL, gPos]); } if (slider == "envir_slider_prim") { llSetLinkPrimitiveParamsFast(2, [PRIM_POS_LOCAL, gPos]); }
-
Thanks a lot for the answers and great examples! 👍 Here's what I've done so far, (it would be great to add the visual slider primitive itself, though ). But also faced such a problem that I need to change the glossiness / environment level without changing the texture itself. Is it possible to set their value without changing the texture? I mean PRIM_SPECULAR / PRIM_NORMAL things or whatever the way. default { touch_start(integer total_number) { if (llDetectedKey(0) != llGetOwner()) return; { vector touchUV = llDetectedTouchUV(0); integer gloss = (integer) (touchUV.x * 255); integer envir = (integer) (touchUV.x * 255); string slider = llGetLinkName(llDetectedLinkNumber(0)); if (slider == "gloss_slider_prim") { llSay(0, (string)gloss); } if (slider == "envir_slider_prim") { llSay(0, (string)envir); } } } }
-
Hello! I am trying to make a sliders to adjust the glossiness and environment levels of the object. I read somewhere that you can split the prim surface into multiple sections, and depending on which section you click on, a value will be assigned, but I can't find it. Please nudge me in the right direction?
-
Thank you! It turned out that my menu was using a random channel (llFrand) every time! I feel stupid.
-
Hello! There is a basic menu script. And it works fine for one object. But is it possible to do something so that several identical non-linked objects with the same menu script work synchronously and perform the same action, regardless of which one I clicked on and their number? Just as if they were working on the same channel? 🤔
-
Hello there! Many many many thanks! The script is awesome! Everything works! 👍
-
Thanks for the answer. It is not entirely clear how to do this and how to add objects with specific names to these lists?
-
Hello there! I am trying to create an unpacker where one could use a button to select which objects to give away. For example, I have three buttons on the HUD, and button1 gives out objects named object1a, object1b, and so on. I just sketched something here, but I'm not sure if I'm on the right track. string button = llGetLinkName(llDetectedLinkNumber(0)); if (button == "button1") { llGiveInventoryList(llGetOwner(), llGetObjectName(object1a), InvenList); llGiveInventoryList(llGetOwner(), llGetObjectName(object1b), InvenList); } I have an unpacker, please help me add such a filter. default { touch_start(integer total_number) { integer x; for(x = 0; x < total_number; x++) { if(llDetectedKey(x) == llGetOwner()) { string InvenName; integer InvenNumber = llGetInventoryNumber(INVENTORY_ALL); list InvenList = []; integer y; for(y = 0; y < InvenNumber; y++) { InvenName = llGetInventoryName(INVENTORY_ALL, y); if(InvenName != llGetScriptName()) InvenList += [InvenName]; } llGiveInventoryList(llGetOwner(), llGetObjectName(), InvenList); } } } }
-
Thank you so much! You helped me a lot! 👍
-
Hello! Thank you! Oh, me no, but my friend does. Could you please tell a little more how to do this? I tried to use the area search, but did not seem to find there how to massively stop scripts, only script info and edit objects one by one... Thank you!
-
Hello there! Can I somehow stop or delete all scripts in the parcel / sim? ( not one by one of course 🙂 )
-
Thank you so much!
-
Hello! How to simulate such an effect using texture animation? It will be like a neon sign and the glass will fill from mid to full. And then mid to full again, and so on. On a cycle, possibly from a timer. And the liquid will be partially white texture. I am considering using this llSetLinkTextureAnim(LINK_THIS, ANIM_ON | SMOOTH | LOOP , ALL_SIDES, 1, 1, 1, 1, 1); but how do I reset back to the middle of a full glass?
-
Thanks again to everyone who took part and pushed me towards the goal! You are the best! 👍
-
Thank you so much! It works! I am very grateful to you! You have helped not only me, but also my friend, he is making a sim dedicated to Egypt, so if this sim appears one day, you contributed to its creation! 👍 list gState = [0, 0, 0, 0, 0, 0, 0, 0, 0]; default { state_entry() { llSetTimerEvent(0.0); } collision_start(integer num) { integer ii; string plate; if (llListFindList(gState, [1]) < 0) // we've only just begun { llSetTimerEvent(30.0); } for (ii = 0; ii < num; ii++) { plate = llGetLinkName(llDetectedLinkNumber(ii)); if (plate == "1") // plate name check { // do something llSay(0, "plate number 1 pressed"); gState = llListReplaceList(gState, [1], 0, 0); } ///---------------------------------------------------------------------- if (plate == "9") { llSay(0, "plate number 9 pressed"); gState = llListReplaceList(gState, [1], 8, 8); } //add in all the other plates here in a similar manner } if (llListFindList(gState, [0]) < 0) { // do MAIN_ACTION(); llSetTimerEvent(0.0); llSay(0, "all plates are pressed"); llResetScript(); } } timer() { llSetTimerEvent(0.0); llSay(0, "Bad luck, move faster next time"); llResetScript(); // and reset the script to have another go } }