Jump to content

SwireD

Resident
  • Content Count

    36
  • Joined

  • Last visited

Community Reputation

4 Neutral

About SwireD

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you very much! It works absolutely perfectly!
  2. Hello! Trying to create a door script with a menu to open in three stages. open, half open and closed. How to do it better? What is responsible for the rotation of the object in this case? This is not for the home but photographic backgrounds.
  3. Hi! Works much better! Thank you all! I had to use different coords for each platform. default { state_entry() { llListen(10, "", "", ""); } listen(integer chan, string name, key id, string msg) { if (msg == "stop") { llSetKeyframedMotion([], [KFM_COMMAND, KFM_CMD_PAUSE]); } else if (msg == "start") { llSetKeyframedMotion([], [KFM_COMMAND, KFM_CMD_PLAY]); llSetKeyframedMotion([ < 3.5, -1.5, 0 > , 3, < 1.5, -3.5, 0 > , 3, < -1.5, -3.5, 0 > , 3, < -3.5, -1.5, 0 > , 3, < -3.5, 1.5, 0 > , 3, < -1.5, 3.5, 0 > , 3, < 1.5, 3.5, 0 > , 3, < 3.5, 1.5, 0 > , 3], [KFM_DATA, KFM_TRANSLATION, KFM_MODE, KFM_LOOP]); } } }
  4. Thank you very much! I managed to create such a script. works almost - after passing the entire circle, the object stops at one point for 3 seconds. How to avoid it? and also if I add on/off toggle then after stop/start the path breaks and the objects begin to move along a different trajectory. Is it possible to keep the path? and the only way to get all the platforms to rotate along one trajectory for me was possible only by placing all the platforms at one point and adding a llSleep() for each subsequent platform with magnification. default { state_entry() { llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_CONVEX]); llSetKeyframedMotion([<0,0,0>, 3, <1.5,3.5,0>, 3, <3.5,1.5,0>, 3, <3.5,-1.5,0>, 3, <1.5,-3.5,0>, 3, <-1.5,-3.5,0>, 3, <-3.5,-1.5,0>, 3, <-3.5,1.5,0>, 3, <-1.5,3.5,0>, 3 ], [KFM_DATA, KFM_TRANSLATION, KFM_MODE, KFM_LOOP]); } }
  5. Hello! a friend of mine asked me a puzzle. How to make the object rotate or move along a certain path (circle)? there will be several such objects (dancepads - one script for each pad...), but the main problem - they cannot be linked to anything! I read somewhere that it is possible to specify the coordinates and the object will move from point to point. how to do it and is there any other way? As example - solar system.
  6. Thank you so VERY MUCH! Now it is finally perfect! vector KEY_OFFSET_DN = < 0.1, 0.0, 0.0 > ; vector KEY_OFFSET_UP = < -0.1, 0.0, 0.0 > ; default { touch_end(integer total_number) { integer KEY = llDetectedLinkNumber(0); if (KEY == 23 || KEY == 22 || KEY == 21 || KEY == 20 || KEY == 19 || KEY == 18) { llPlaySound(llGetLinkName(KEY), 1.0); // llSay(0, "linknumber " + (string) KEY + " pressed, and it's name is " + llGetLinkName(KEY)); llSetLinkPrimitiveParamsFast(KEY, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(KEY, [PRIM_POS_LOCAL]), 0) + KEY_OFFSET_UP]); llSleep(0.1); llSetLinkPrimitiveParamsFast(KEY, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(KEY, [PRIM_POS_LOCAL]), 0) + KEY_OFFSET_DN]); } } }
  7. Oh i forgot quotes! "" But for some reason it says "Key1" for each key. And for non-key objects... integer i = llGetNumberOfPrims(); if (llGetLinkName(i) == "KEY1") { llSay(0, "Key1"); } if (llGetLinkName(i) == "KEY2") { llSay(0, "Key2"); } if (llGetLinkName(i) == "KEY3") { llSay(0, "Key3"); } if (llGetLinkName(i) == "KEY4") { llSay(0, "Key4"); } if (llGetLinkName(i) == "KEY5") { llSay(0, "Key5"); } if (llGetLinkName(i) == "KEY6") { llSay(0, "Key6"); }
  8. From what I managed to learn from the wiki, this turned out, but for some reason it does not work. i renamed the key... vector KEY_OFFSET_DN = < 0.1, 0.0, 0.0 > ; vector KEY_OFFSET_UP = < -0.1, 0.0, 0.0 > ; string KEY_SOUND_1 = "72a7fa0d-0e74-ca84-3894-c4eae665fac7"; string KEY_SOUND_2 = "d302a5fa-21ae-6f55-0d1c-ec55bd58f895"; string KEY_SOUND_3 = "7d5ef849-1f02-8399-3bb2-758833d455a1"; string KEY_SOUND_4 = "8b76dbc1-c003-2fe7-0f2c-6c03238e0793"; string KEY_SOUND_5 = "c9ee84ab-3ec3-ab47-9584-4bb859c2ec20"; string KEY_SOUND_6 = "502d772c-47cc-918c-40aa-0d7df0a67e11"; string KEY1; string KEY2; string KEY3; string KEY4; string KEY5; string KEY6; default { touch_end(integer total_number) { integer i = llGetNumberOfPrims(); if (llGetLinkName(i) == KEY1) { llSay(0, "Key1"); } } }
  9. Yes indeed ! I completely missed this moment!
  10. Thank you so much! Now its perfect! vector KEY_OFFSET_DN = < 0.1, 0.0, 0.0 > ; vector KEY_OFFSET_UP = < -0.1, 0.0, 0.0 > ; //string KEY_SOUND_1 = ""; default { touch_end(integer total_number) { integer KEY = llDetectedLinkNumber(0); if (KEY == 23 || KEY == 22 || KEY == 21 || KEY == 20 || KEY == 19 || KEY == 18) { llSay(0, "Key " + (string) KEY + " pressed"); llSetLinkPrimitiveParamsFast(KEY, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(KEY, [PRIM_POS_LOCAL]), 0) + KEY_OFFSET_UP]); llSleep(0.1); llSetLinkPrimitiveParamsFast(KEY, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(KEY, [PRIM_POS_LOCAL]), 0) + KEY_OFFSET_DN]); } } }
  11. vector KEY_OFFSET_UP = < 0.0, 0.0, 0.1 >; vector KEY_OFFSET_DN = < 0.0, 0.0, -0.1 >; //string KEY_SOUND_1 = ""; default { touch_end(integer total_number) { integer KEY = llDetectedLinkNumber(0); llSay(0, "Key "+(string)KEY+" pressed"); llSetLinkPrimitiveParamsFast (KEY, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(KEY, [PRIM_POS_LOCAL]), 0) + KEY_OFFSET_UP]); llSleep(0.1); llSetLinkPrimitiveParamsFast (KEY, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(KEY, [PRIM_POS_LOCAL]), 0) + KEY_OFFSET_DN]); } } Thank you so much! Just one more thing - if piano has prims which dont need to move how to make this if check?
  12. I made this experimental draft for 3 keys but it looks not very good. How to simplify it? default { touch_end(integer total_number) { integer KEY = llDetectedLinkNumber(0); if (KEY == 2) { llSay(0, "Key 1 pressed"); llSetLinkPrimitiveParams(2, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(2, [PRIM_POS_LOCAL]), 0) + <0.0, 0.0, 1.0>]); llSleep(1); llSetLinkPrimitiveParams(2, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(2, [PRIM_POS_LOCAL]), 0) + <0.0, 0.0, -1.0>]); } if (KEY == 3) { llSay(0, "Key 2 pressed"); llSetLinkPrimitiveParams(3, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(3, [PRIM_POS_LOCAL]), 0) + <0.0, 0.0, 1.0>]); llSleep(1); llSetLinkPrimitiveParams(3, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(3, [PRIM_POS_LOCAL]), 0) + <0.0, 0.0, -1.0>]); } if (KEY == 4) { llSay(0, "Key 3 pressed"); llSetLinkPrimitiveParams(4, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(4, [PRIM_POS_LOCAL]), 0) + <0.0, 0.0, 1.0>]); llSleep(1); llSetLinkPrimitiveParams(4, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(4, [PRIM_POS_LOCAL]), 0) + <0.0, 0.0, -1.0>]); } } }
  13. Thank you! so i made my key move a bit up but how to make it move back in a second? llSetLinkPrimitiveParams(2, [PRIM_POS_LOCAL, llList2Vector(llGetLinkPrimitiveParams(2, [PRIM_POS_LOCAL]), 0) + <0.0, 0.0, 1.0>]);
  14. Hello! I make a small piano of 6 keys and I need to make a script so that the buttons move slightly in space when I click on them, as if someone touched them. How to do it better? It will be a linkset. Each key separate. I guess should start with something like: default { touch_end(integer total_number) { integer face = llDetectedTouchFace(0); if (face == 1) { llSay(0, "Key 1 pressed"); // Do something with key } } } But how to move keys? a little bit rotated and moved?
  15. Thank you all so much! I’ll have to explain it to my friend.
×
×
  • Create New...