Jump to content

MIVIMEX

Resident
  • Posts

    177
  • Joined

  • Last visited

Everything posted by MIVIMEX

  1. Hello! I have a question. I'm building a boat and there must be a refrigerator with a door with lighting on/off when door is open/close. I want to add such a lines to script, but I do not know where. Advise please! THANK YOU! LINES TO ADD: /////////////////ON llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE,<1.0, 1.0, 1.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.4]); ///////////////// OFF llSetPrimitiveParams([PRIM_POINT_LIGHT,FALSE,<1.0, 1.0, 1.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.0]); DOOR SCRIPT (For vehicles) //------------------------------------------------------ // Timeless Linked Door Script by Timeless Prototype //------------------------------------------------------ // The latest version of this script can always be found // in the Library section of the wiki: // http://www.secondlife.com/badgeo/ // This script is free to use, but whereever it is used // the SCRIPT's permissions MUST be set to: // [x] Next owner can modify // [x] Next owner can copy // [x] Next owner can transfer // [x] Allow anyone to copy // [x] Share with group //------------------------------------------------------ // USAGE INSTRUCTIONS FOR EVERYDAY USE: //------------------------------------------------------ // Say the following commands on channel 0: // 'unlock' - Unlocks all doors in range. // 'lock' - Locks all doors in range and allows // only the permitted users to open it. // To open the door, either Touch it, Walk into it or // say 'open' or say 'close'. //------------------------------------------------------ // USAGE INSTRUCTIONS FOR BUILDERS: //------------------------------------------------------ // 1. Copy and paste this script into the door prim and // change the settings (see further down). // 2. The door prim must be linked to at least one other // prim (could be linked to the house for example). // 3. The door prim MUST NOT be the root prim. // 4. Use Edit Linked Parts to move, rotate and size the // door prim for the closed state. // 5. When ready, stand close to the door and say // '/door closed' (this records the closed door // position, rotation and size to the object's // name and description). // 6. Use the Edit Linked parts to move, rotate and size // the door prim for the opened state. // 7. When ready, stand close to the door and say // '/door opened' (this records the opened door // position, rotation and size). // 8. Once recorded it will not accept these commands // again. If you do need to redo the settings then // delete the Name and Description of the door prim // (these are where the position information is // stored), and then follow the steps above again. // Note: deleting the object name won't save, so set // the object name to 'Object' to reset the object // name. //------------------------------------------------------ // Change these settings to suit your needs. //------------------------------------------------------ // To mute any/all of the sounds set the sound string(s) // to "" (empty string). // To get the UUID of a sound, right click on the sound // in your inventory and choose "Copy Asset UUID", then // paste the UUID in here. string doorOpenSound = "9a076511-9aa8-f50d-e34c-1396a07a66a9"; string doorCloseSound = "876d3492-b8b8-7745-f5ae-dc5176ec6105"; string confirmedSound = "69743cb2-e509-ed4d-4e52-e697dc13d7ac"; string accessDeniedSound = "58da0f9f-42e5-8a8f-ee51-4fac6c247c98"; string doorBellSound = ""; // Setting to empty stops door announcements too. float autoCloseTime = 0.0; // 0 seconds to disable auto close. integer allowGroupToo = TRUE; // Set to FALSE to disallow same group access to door. list allowedAgentUUIDs = ["e032aea2-9489-40d3-87b3-713300ead4cc"]; // Comma-separated, quoted list of avatar UUIDs who are allowed access to this door. integer listenChannel = 0; //------------------------------------------------------ // Leave the rest of the settings alone, these are // handled by the script itself. //------------------------------------------------------ integer isLocked = FALSE; // Only when the door is locked do the permissions apply. integer isOpen = TRUE; vector openPos = ZERO_VECTOR; rotation openRot = ZERO_ROTATION; vector openScale = ZERO_VECTOR; vector closedPos = ZERO_VECTOR; rotation closedRot = ZERO_ROTATION; vector closedScale = ZERO_VECTOR; key openerKey = NULL_KEY; key closerKey = NULL_KEY; integer isSetup = FALSE; integer listenHandle = 0; string avatarName = ""; mySayName(integer channel, string objectName, string message) { string name = llGetObjectName(); llSetObjectName(objectName); llSay(0, "/me " + message); llSetObjectName(name); } mySay(integer channel, string message) { string name = llGetObjectName(); llSetObjectName("Door"); llSay(0, message); llSetObjectName(name); } myOwnerSay(string message) { string name = llGetObjectName(); llSetObjectName("Door"); llOwnerSay(message); llSetObjectName(name); } mySoundConfirmed() { if (confirmedSound != "") { llTriggerSound(confirmedSound, 1.0); } } mySoundAccessDenied() { if (accessDeniedSound != "") { llTriggerSound(accessDeniedSound, 1.0); } } myGetDoorParams() { isSetup = FALSE; if (llSubStringIndex(llGetObjectDesc(), "door;") == 0 && llSubStringIndex(llGetObjectName(), "door;") == 0) { list nameWords = llParseString2List(llGetObjectName(), [";"], []); list descWords = llParseString2List(llGetObjectDesc(), [";"], []); if (llGetListLength(nameWords) != 4 || llGetListLength(descWords) != 4) { myOwnerSay("The door prim's name and/or description has invalid syntax and/or number of parameters. Delete the door prim's name and description and setup the door prim again."); } else { openPos = (vector)llList2String(nameWords, 1); openRot = (rotation)llList2String(nameWords, 2); openScale = (vector)llList2String(nameWords, 3); closedPos = (vector)llList2String(descWords, 1); closedRot = (rotation)llList2String(descWords, 2); closedScale = (vector)llList2String(descWords, 3); isSetup = TRUE; } } } mySetDoorParams(vector openPos, rotation openRot, vector openScale, vector closedPos, rotation closedRot, vector closedScale) { llSetObjectName("door;" + (string)openPos + ";" + (string)openRot + ";" + (string)openScale); llSetObjectDesc("door;" + (string)closedPos + ";" + (string)closedRot + ";" + (string)closedScale); isSetup = TRUE; } integer myPermissionCheck(key id) { integer hasPermission = FALSE; if (isLocked == FALSE) { hasPermission = TRUE; } else if (llGetOwnerKey(id) == llGetOwner()) { hasPermission = TRUE; } else if (allowGroupToo == TRUE && llSameGroup(id)) { hasPermission = TRUE; } else if (llListFindList(allowedAgentUUIDs, [(string)id]) != -1) { hasPermission = TRUE; } return hasPermission; } myOpenDoor() { isOpen = FALSE; myToggleDoor(); } myCloseDoor() { isOpen = TRUE; myToggleDoor(); } myToggleDoor() { if (isSetup == FALSE) { myOwnerSay("The door prim has not been configured yet. Please read the usage instructions in the door script."); } else if (llGetLinkNumber() == 0 || llGetLinkNumber() == 1) { myOwnerSay("The door prim must be linked to at least one other prim and the door prim must not be the root prim"); } else { isOpen = !isOpen; if (isOpen) { if (doorBellSound != "") { llTriggerSound(doorBellSound, 1.0); if (avatarName != "") { mySayName(0, avatarName, "is at the door."); avatarName = ""; } } if (doorOpenSound != "") { llTriggerSound(doorOpenSound, 1.0); } llSetPrimitiveParams([ PRIM_POSITION, openPos, PRIM_ROTATION, ZERO_ROTATION * openRot / llGetRootRotation(), PRIM_SIZE, openScale ]); // Door API. llMessageLinked(LINK_SET, 255, "cmd|door|opened", NULL_KEY); } else { if (doorCloseSound != "") { llTriggerSound(doorCloseSound, 1.0); } llSetPrimitiveParams([ PRIM_POSITION, closedPos, PRIM_ROTATION, ZERO_ROTATION * closedRot / llGetRootRotation(), PRIM_SIZE, closedScale ]); // Door API. llMessageLinked(LINK_SET, 255, "cmd|door|closed", NULL_KEY); } llSetTimerEvent(0.0); if (isOpen == TRUE && autoCloseTime != 0.0) { llSetTimerEvent(autoCloseTime); } } } default { state_entry() { listenHandle = llListen(listenChannel, "", NULL_KEY, ""); myGetDoorParams(); } touch_start(integer total_number) { if (myPermissionCheck(llDetectedKey(0)) == TRUE) { avatarName = llDetectedName(0); myToggleDoor(); } else { mySoundAccessDenied(); } } timer() { myCloseDoor(); } link_message(integer sender_num, integer num, string str, key id) { // Door API. The API is here in case you want to create PIN entry keypads or whatever. if (num == llGetLinkNumber()) { if (str == "cmd|door|doOpen") { myOpenDoor(); } else if (str == "cmd|door|doClose") { myCloseDoor(); } } if (str == "cmd|door|discover") { llMessageLinked(LINK_SET, 255, "cmd|door|discovered|" + (string)llGetKey(), id); } } listen(integer channel, string name, key id, string message) { // Performance note: it's quicker to compare the strings than to compare permissions each time anyone says anything on this channel. if (message == "open") { if (myPermissionCheck(id) == TRUE) { // Only open the door if the person is quite close to this door. openerKey = id; closerKey = NULL_KEY; avatarName = name; llSensor(name, id, AGENT, 5.0, TWO_PI); } else { mySoundAccessDenied(); } } else if (message == "close") { if (myPermissionCheck(id) == TRUE) { openerKey = NULL_KEY; closerKey = id; avatarName = name; // Only close the door if the person is quite close to this door. llSensor(name, id, AGENT, 5.0, TWO_PI); } else { mySoundAccessDenied(); } } else if (message == "lock") { if (myPermissionCheck(id) == TRUE) { isLocked = TRUE; mySoundConfirmed(); } else { mySoundAccessDenied(); } } else if (message == "unlock") { if (myPermissionCheck(id) == TRUE) { isLocked = FALSE; mySoundConfirmed(); } else { mySoundAccessDenied(); } } else if (message == "/door opened" && llSubStringIndex(llGetObjectName(), "door;") == -1) { if (llGetOwnerKey(id) == llGetOwner()) { mySoundConfirmed(); openPos = llGetLocalPos(); openRot = llGetLocalRot(); openScale = llGetScale(); isOpen = TRUE; if (! (closedPos == ZERO_VECTOR && closedRot == ZERO_ROTATION && closedScale == ZERO_VECTOR)) { mySetDoorParams(openPos, openRot, openScale, closedPos, closedRot, closedScale); } } else { mySoundAccessDenied(); } } else if (message == "/door closed" && llSubStringIndex(llGetObjectDesc(), "door;") == -1) { if (llGetOwnerKey(id) == llGetOwner()) { mySoundConfirmed(); closedPos = llGetLocalPos(); closedRot = llGetLocalRot(); closedScale = llGetScale(); isOpen = FALSE; if (! (openPos == ZERO_VECTOR && openRot == ZERO_ROTATION && openScale == ZERO_VECTOR)) { mySetDoorParams(openPos, openRot, openScale, closedPos, closedRot, closedScale); } } else { mySoundAccessDenied(); } } } sensor(integer num_detected) { if (openerKey != NULL_KEY) { integer i; for (i = 0; i < num_detected; i++) { if (llDetectedKey(i) == openerKey && myPermissionCheck(llDetectedKey(i)) == TRUE) { myOpenDoor(); } } openerKey = NULL_KEY; } else { integer i; for (i = 0; i < num_detected; i++) { if (llDetectedKey(i) == closerKey && myPermissionCheck(llDetectedKey(i)) == TRUE) { myCloseDoor(); } } closerKey = NULL_KEY; } } //------------------------------------------------------ // Uncomment the following code if you particularly want // collisions to affect the door state. //------------------------------------------------------ // collision_start(integer num_detected) // { // integer i; // for (i = 0; i < num_detected; i++) // { // if (myPermissionCheck(llDetectedKey(i)) == TRUE) // { // avatarName = llDetectedName(i); // myOpenDoor(); // } // else if (llDetectedType(i) & AGENT) // { // mySoundAccessDenied(); // } // } // } } // End of default state and end of script
  2. @Berksey @Fionalein Thank you very much again for science! I have acquired a lot of knowledge thanks to you. The Straw Man has only 8 prims, looks great and the main thing works fine! It's very interesting to read your answers, I'm getting smarter and smarter!
  3. HELLO! I'm trying to create an exploding barrel and now I made such a mesh. But I have a problem with baking AO shadows texture. On the sides of the barrel where the ribs are visible strips. This is despite the fact that the cylinder 24 VERTS, the SMOOTH is switched on. I can of course make a blur in the photo editor, but how can I make the blur in the settings of baking? Is this possible? Please advise. Thank you so much!
  4. @Berksey Could you please tell me how to make a dummy disappear at the end when points end?
  5. @Fionalein @Berksey Thank you so MUCH! Your help was invaluable to me! With your support, I managed to create the required script. Thank you for being so kind and sending me your straw dummy. It is beautiful!
  6. @Fionalein @Wulfie Reanimator @Lucia Nightfire Hello! Thanks to everyone who responded to my question!!! I used the recommended script but I do not know exactly where to add sound and particles. The script that I got plays sound with every hit of a bullet, particles also go constantly (this my fault-bad particles system). But I need it to happen only when an explosion occurs when HP is at zero. I tried to reduce HP or increase the damage but it did not help. Please advise where to put the system of particles and sound to work only when the explosion? Thanks again! integer hit_value = 10;//How much health we loose each time we are hit. integer health_value = 100;//Our total health // My example sound... string sound = "b36b6ef4-c125-8660-89a8-73648ba69ba4"; default{ // state_entry(){ llSetText("Health: "+(string)health_value, llGetColor(0), 1.0); //Show our default health value } // collision_start(integer total_number){ integer i; for( i = 0; i < total_number; i++ ){ if(llDetectedType(i) & AGENT) return; //Check if its an object or avatar/agent hitting us, if avatar, return/stop here. health_value -= hit_value; // Detect a collision from an object, we remove our hit value llSetText("Health: "+(string)health_value, llGetColor(0), 1.0); // Set floating text to show how much health we have left. if(health_value == 0 || health_value < 0) state lldie; // I added This ... llTriggerSound(sound, 1.0); //And this... llParticleSystem([PSYS_PART_MAX_AGE,0.88, PSYS_PART_FLAGS, 259, PSYS_PART_START_COLOR, <0.80900, 0.61643, 0.19086>, PSYS_PART_END_COLOR, <0.95090, 0.23954, 0.04910>, PSYS_PART_START_SCALE,<0.80000, 0.80337, 0.00000>, PSYS_PART_END_SCALE,<0.90828, 0.90234, 0.00000>, PSYS_SRC_PATTERN, 2, PSYS_SRC_BURST_RATE,0.55, PSYS_SRC_BURST_PART_COUNT,33, PSYS_SRC_BURST_RADIUS,0.55, PSYS_SRC_BURST_SPEED_MIN,0.72, PSYS_SRC_BURST_SPEED_MAX,3.33, PSYS_SRC_ANGLE_BEGIN, 1.35, PSYS_SRC_ANGLE_END, 1.35, PSYS_SRC_MAX_AGE, 0.0, PSYS_SRC_TEXTURE, "74e8631c-33a9-bc1a-03d3-ede886272a21", PSYS_PART_START_ALPHA, 0.61, PSYS_PART_END_ALPHA, 0.05, PSYS_PART_START_GLOW, 0.10, PSYS_PART_END_GLOW, 0.00]); // Check how much health is left after removing hit value, if 0 or less.. die. } } // } state lldie{ // state_entry(){ llSetText("Health: "+(string)health_value, llGetColor(0), 1.0); //Update our text, to show we have no health left. llDie(); llSay(0,"/me is Dead!.."); } // }
  7. Hello! I'm trying to create a script of an exploding barrel. I want the object (the barrel - a single mesh object) to explode when bullets hit it - throwing out the explosion particles, making a sound, maybe becoming physical and flying off to the side and self destruct. Have any ideas? Thank you! If I ask to scripters - how much could it cost to write such a script these days?
  8. @angeoco @Chic Aeon @Nalates Urriah Thank you very much to everyone who took part! Tried everything you advised me. I put about the same values of the gloss. I used both prim light and windlight. I am very satisfied with the result. At settings CalWL the skin looks perfect. I'm convinced that the skin is all right. It's probably just that they are different manufacturers and the head and body are different meshes with different structures. Also think it's just a small shadow.
  9. thanks for informative answer! but now i got following question. what settings of the viewer should be to make it more visible which shimmer I put on my head and body? (pardon my noobility, i think it calls "windlights") i can of course just turn the shimmer off , but I want to keep a small gloss ("evenly")
  10. Hello! Help please customize the mesh avatar! Head of Catwa Catya, body of Mitreya Lara. Skin Glam Affair Rina. The problem is that I can not connect the head with the body without a visible transition on the neck. how to do it? if it's the settings, then what should they be? Thanks for any help! Сan it be matter of specularity? if you set the same values, the transition disappears?
  11. @angeoco @Rolig Loon Yes, pardon mistake , I recounted it turned out about 12 km per hour. Thanks again! One of my speedometers was right!
  12. @Rolig Loon Thank you! it was a very interesting experiment! I have numbers when walking: [10:33] Object: Collision at 88436.000000 [10:34] Object: Collision at 88442.420000 = ~ ̶6̶ 3 meters per second Then I translated the meters per second in kilometers per hour and I got such a value: ̶2̶1̶ 12 kph! ( ̶a̶s̶ ̶f̶o̶r̶ ̶m̶e̶ ̶i̶t̶'̶s̶ ̶s̶o̶ ̶f̶a̶s̶t̶!̶ ̶) Its ok! @angeoco Thank you! I will have something to think about!
  13. Hello! I need some help please! I'm trying to make a speedometer. Does anyone know what is the actual speed of the flight or walking avatar in the sl? I need to calibrate. I tried two speedometers at the same time they show different numbers. Thank you!
  14. @Chic Aeon @Alyona Su @Lindal Kidd @Rolig Loon Thank you all for your answers! you gave me a lot of useful information!
  15. @Rolig Loon Сan this depend on the object in which the script is placed and the length of the name of the sound file? I just do not know what else can be the difference.
  16. @Rolig Loon Thank you for answer! Yes, I'm using script with scripting function llPreloadSound. But how to explain that some sound files start to play faster than others even for different people?
  17. Hello! A question about full lenght songs. Why do some sound files start to play faster than others? I use the usual music player, but I have to wait for the song to be loaded. Some songs are played almost immediately, others have to wait. And does not depend on that for the first or the tenth time I listen to the song. On what does it depend? Any help please! Thanks!
  18. @KT Kingsley Thank you very much for your script! This is exactly what I needed. It's just priceless. A real godsend for a boat builder! Thanks!
  19. Hello! Help please with particles! I build a boat and I want to make such a wake on the water, which starts from the very nose and goes around the boats's hull. I saw it inworld so I believe its possible, I just dont know how. Particles does not go through the hull. They are slightly spraying forward and then circling the boat. But my particles go through without encountering obstacles. How can I simulate such particle wake? I have a particle script generator. I'm playing with sliders but I can not find the right one yet. Maybe someone has done this before and just tell the right parameter? This would greatly help. (Animation shows my particles going through obstacle)
  20. Hello! Help, please, with particles. I have a script, but it always emits particles in one direction, no matter how I rotate the object. How to make the emission change the direction when the object rotates (attached or rezzed)? Is this difficult? Thank you! ---------+--------- The problem solved. Just had to use 'cone' instead of 'angle'.
  21. @Lindal Kidd @Rolig Loon Hello! Thank you so much! The idea with the pose stand was just what I needed!
  22. Hello! I bought a beard and it consists of two parts. Beard and mustache. But I want to link them in one object. I can not link them attached. If I rez them and link on the ground, it turns out not exactly I want, I have to adjust the new linked attached beard. The mustache also consists of several parts and they lose shape. Advise please, how to link them without lose shape? Thank you!
  23. @Rolig Loon @Fionalein Finally the problem solved! I've adapted altimeter to depth gauge by slightly changing it. Thank you all so much!
  24. Ok, thanks, I will try to combine them. I also posted on a scripter wanted forum. If anyone interested, please, let me know!
  25. @Rolig Loon@Fionalein I have a compass and altimeter script that just animates the texture depending on the direction or altitude. Is it possible to replace the direction or altitude by the depth? And how?
×
×
  • Create New...