Jump to content

Search the Community

Showing results for tags 'script'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • People Forum
    • Your Avatar
    • Make Friends
    • Lifestyles and Relationships
    • Role Play
    • General Discussion Forum
    • Forums Feedback
    • Missed Connections
    • Second Life Education
  • Places and Events Forum
    • Favorite Destinations
    • Upcoming Events and Activities
    • Games in Second Life
  • Official Contests & Events
    • Leap Into Love Snapshot Contest
  • Creation Forum
    • Fashion
    • Art, Music and Photography
    • Animation Forum
    • Bakes on Mesh
    • Environmental Enhancement Project
    • Machinima Forum
    • Building and Texturing Forum
    • Mesh
    • LSL Scripting
    • LSL Library
    • Experience Tools Forum
    • Sansar for Second Life Residents
  • Technology Forum
    • Second Life Server
    • Second Life Viewer
    • Second Life Web
    • General Second Life Tech Discussion
  • Commerce Forum
    • Merchants
    • Inworld Employment
    • Wanted
  • Land Forum
    • General Discussion
    • Mainland
    • Linden Homes
    • Regions for Sale: Full Private Island
    • Region for Rent: Full Private Island
    • Regions for Sale: Homesteads
    • Region Rentals: Homestead
    • Parcels for Sale: Mainland
    • Parcels for Rent: Mainland
    • Wanted: Full Private Island
    • Wanted: Homesteads
    • Wanted: Mainland
  • International Forum
    • Deutsches Forum
    • Foro en español
    • Forum in italiano
    • Forum français
    • 日本語フォーラム
    • 한국어 포럼
    • Fórum em português
    • Forum polskie
    • المنتدى العربي
    • Türkçe Forum
    • Форум по-русски
  • Adult Content Forum
    • Highlight Upcoming Events
    • General Discussion
    • General Announcements
  • Answers
    • Abuse and Griefing
    • Account
    • Avatar
    • Creation
    • Inventory
    • Getting Started
    • Controls
    • Land
    • Linden Dollars (L$)
    • Shopping
    • Technical
    • Viewers
    • Everything Else
    • International Answers

Blogs

  • Commerce
  • Featured News
  • Inworld
  • Tools and Technology
  • Tips and Tricks
  • Land

Categories

  • English
  • Deutsch
  • Français
  • Español
  • Português
  • 日本語
  • Italiano
  • Pусский
  • Türkçe

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 219 results

  1. Hello! A friend gave me a script, but neither she nor I know what it is for. can someone say what the script is and what is it for? (script name: desaparecer despacio) // // USER VARIABLES // // // INTERNAL VARIABLES // vector home; integer penState; float penColor; float color; float ghost; vector originalScale; float sizePercent; integer numAvatarsNearby; vector nearestAvPosition; key ownerKey; vector ownerPosition; // // INTERNAL FUNCTIONS // // move(steps) // move object a number of steps (meters) along its current heading // forward is along the positive x axis // if the pen is down, create a line segment along the path traveled // the line is positioned by its center, which is placed halfway back along the path move(float steps) { vector fwd = llRot2Fwd(llGetRot()) * steps; llSetPos(llGetPos() + fwd); if (penState == TRUE) { if (llGetInventoryType("lineSegment") == INVENTORY_NONE) { llSay(0, "Oops! To draw a line, my inventory needs a lineSegment. You can get one from the Scratch Inventory Box."); } else { integer randomID = llRound(llFrand(99999999)); llRezObject("lineSegment", llGetPos()-fwd/2, <0,0,0>, llGetRot(), randomID); llSay(1, (string)randomID + ":set length:"+ (string)llFabs(steps)); llSay(1, (string)randomID + ":set color:" + (string)penColor); } } } // turnRight(float angle) // turn angle degrees clockwise around the local z axis turnRight(float angle) { angle *= -1; rotation newRot = llEuler2Rot(<0,0,angle> * DEG_TO_RAD); llSetRot(newRot*llGetRot()); } // turnLeft(float angle) // turn angle degrees counterclockwise around the local z axis turnLeft(float angle) { rotation newRot = llEuler2Rot(<0,0,angle> * DEG_TO_RAD); llSetRot(newRot*llGetRot()); } //up(float steps) //move up along the global z axis by steps meters //does not leave a line segment up(float steps) { llSetPos(llGetPos()+<0,0,steps>); } //down(float steps) //move down along the global z axis by steps meters //does not leave a line segment down(float steps) { llSetPos(llGetPos()+<0,0,-1*steps>); } // turnPitch(float angle) // turn angle degrees upward around the local y axis turnPitch(float angle) { angle *= -1; rotation newRot = llEuler2Rot(<0,angle,0> * DEG_TO_RAD); llSetRot(newRot*llGetRot()); } // float getHeading() // return the current heading in the xy plane in degrees float getHeading() { return llRot2Angle(llGetRot())*RAD_TO_DEG; } // setHeading(float angle) // set the heading in the xy plane in degrees setHeading(float angle) { vector newVec = <0, 0, angle*DEG_TO_RAD>; rotation newRot = llEuler2Rot(newVec); llSetRot(newRot); } // turnRoll(float angle) // turn angle degrees clockwise around the local x axis turnRoll(float angle) { rotation newRot = llEuler2Rot(<angle,0,0> * DEG_TO_RAD); llSetRot(newRot*llGetRot()); } // changePenColorBy(float num) // change the pen color by an amount changePenColorBy(float num) { penColor += num; setPenColorTo(penColor); } // setPenColorTo(float num) // set the pen to a particular color setPenColorTo(float num) { penColor = (integer)num % 100; } // penDown() // put the pen down, so that when the object moves it will draw penDown() { penState = TRUE; } // penUp() // put the pen up, so that the object will not draw when it moves penUp() { penState = FALSE; } // clear() // broadcast a message to nearby line segments that will cause them to // delete themselves clear() { llSay(1, "clearLineSegments"); } // pointTowardNearestAv() // turn to point toward the nearest avatar pointTowardNearestAv() { vector myPos = llGetPos(); float xdiff = myPos.x - nearestAvPosition.x; float ydiff = myPos.y - nearestAvPosition.y; float angle = llAtan2(xdiff, ydiff) * RAD_TO_DEG; setHeading(270 - angle); } // pointTowardOwner() // turn to point toward the owner pointTowardOwner() { vector myPos = llGetPos(); float xdiff = myPos.x - ownerPosition.x; float ydiff = myPos.y - ownerPosition.y; float angle = llAtan2(xdiff, ydiff) * RAD_TO_DEG; setHeading(270 - angle); } // float distanceToNearestAv() // returns the distance in meters to the nearest avatar float distanceToNearestAv() { return llVecDist(llGetPos(), nearestAvPosition); } // float distanceToOwner() // returns the distance in meters to the owner float distanceToOwner() { return llVecDist(llGetPos(), ownerPosition); } // float randomMinToMax(float min, float max) // returns a random number between min and max integer randomMinToMax(float min, float max) { return llRound(llFrand(max - min) + min); } // say(string text) // say the text on the public chat channel 0 so all nearby avatars and objects will hear it say(string text) { llSay(0, text); } // broadcast(string message) // say the message on channel 1. No avatars will hear it. // all nearby objects will hear it. broadcast(string message) { llSay(1, message); } // setText(string text) // create opaque white floating text above the object setText(string text) { llSetText(text, <1,1,1>, 1); } // vector hueToRGB(float h) // take a color represented as a hue value between 1 and 100 and // return an RGB vector representing the same color. vector hueToRGB(float h) { integer i; float f; float p; float q; float t; float r; float g; float b; float s = 1; float v = 1; h *= 5; // sector 0 to 5 i = llFloor(h); f = h - i; // factorial part of h p = v * ( 1 - s ); q = v * ( 1 - s * f ); t = v * ( 1 - s * ( 1 - f ) ); if (i == 0) { r = v; g = t; b = p; } else if (i == 1) { r = q; g = v; b = p; } else if (i == 2) { r = p; g = v; b = t; } else if (i == 3) { r = p; g = q; b = v; } else if (i == 4) { r = t; g = p; b = v; } else { r = v; g = p; b = q; } return <r,g,b>; } // setColor(float num) // set the color of the object using a number between 1 and 100 representing a hue setColor(float num) { color = (integer)num % 100; llSetColor(hueToRGB(color / 100), ALL_SIDES); if (llGetObjectName() == "Scratch Bug") { llSetLinkColor(2, hueToRGB(color / 100), ALL_SIDES); } else { //llSetLinkColor(LINK_SET, hueToRGB(color / 100), ALL_SIDES); } } // changeColorBy(float num) // change the hue of the object by a number changeColorBy(float num) { float newColor = color + num; if (newColor < 0) { newColor = 0; } if (newColor > 100) { newColor = 100; } setColor(newColor); } // setGhost(float num) // set the ghost effect of the object to a value between 0 (opaque) and 100 (transparent) setGhost(float num) { ghost = (integer)num % 101; llSetAlpha(((100 - ghost) / 100), ALL_SIDES); llSetLinkAlpha(LINK_SET, ((100 - ghost) / 100), ALL_SIDES); } // changeGhostBy(float num) // change the ghost effect on an object by a number changeGhostBy(float num) { setGhost(ghost + num); } // setSize(float newSize) // set the size of the object to a percentage of its original size setSize(float newSize) { sizePercent = newSize; vector newScale = originalScale*(sizePercent/100); llSetScale(newScale); } // changeSizeBy(float change) // change the size of an object by a percentage of its original size changeSizeBy(float change) { sizePercent += change; vector newScale = originalScale*(sizePercent/100); llSetScale(newScale); } // playSound(string snd) // play a sound at full volume // snd can be the name of a sound in the inventory of the object, or the // UUID of a sound which exists somewhere else playSound(string snd) { llPlaySound(snd, 1); } // playSoundNamed(string snd) // play a sound at full volume // snd can be the name of a sound in the inventory of the object, or the // UUID of a sound which exists somewhere else // this is the version for text input of the name of a sound in a scratch block // so it checks the inventory and gives an error if the sound is missing playSoundNamed(string snd) { if (llGetInventoryType(snd) == INVENTORY_NONE) { llSay(0, "Oops! My inventory does not contain the sound " + snd); } else { llPlaySound(snd, 1); } } // wait(float secs) // pause all execution of this script for some number of seconds wait(float secs) { llSleep(secs); } // levelOut() // remove the x and y rotation components, so that the object is // level with respect to the ground levelOut() { vector myVec = llRot2Euler(llGetRot()); vector newVec = <0, 0, myVec.z>; rotation newRot = llEuler2Rot(newVec); llSetRot(newRot); } // goHome() // move the object back to its home position // home is set the the position of the object when it is created, // and can be set to a new position using setHomeHere() goHome() { llSetPos(home); //levelOut(); } // setHomeHere() // set the home position to the current position setHomeHere() { home = llGetPos(); } // startListening() // listen for messages on both channel 0, the public channel, // and channel 1, where broadcasts are sent startListening() { llListen(0, "", "", ""); llListen(1, "", "", ""); } // initInternal() // do some setup for internal functions // this includes setting various variables to their defaults // clearing text on the object, and turning on // the repeating sensor and timer events initInternal() { setHomeHere(); penState = FALSE; penColor = 0; color = 0; ghost = 0; sizePercent = 100; originalScale = llGetScale(); ownerKey = llGetOwner(); llSetText("", <1,1,1>, 0); llSensorRepeat("", "", AGENT, 96, PI, .1); llSetTimerEvent(.1); startListening(); } initAll() { initInternal(); } timer1(){ wait(15); setGhost(0); wait(0.1); setGhost(0.1); wait(0.1); setGhost(0.3); wait(0.1); setGhost(0.5); wait(0.1); setGhost(1); wait(0.1); setGhost(2); wait(0.1); setGhost(3); wait(0.1); setGhost(4); wait(0.1); setGhost(5); wait(0.1); setGhost(7); wait(0.1); setGhost(10); wait(0.1); setGhost(15); wait(0.1); setGhost(20); wait(0.1); setGhost(25); wait(0.1); setGhost(30); wait(0.1); setGhost(35); wait(0.1); setGhost(40); wait(0.1); setGhost(45); wait(0.1); setGhost(50); wait(0.1); setGhost(55); wait(0.1); setGhost(60); wait(0.1); setGhost(65); wait(0.1); setGhost(70); wait(0.1); setGhost(75); wait(0.1); setGhost(80); wait(0.1); setGhost(85); wait(0.1); setGhost(90); wait(0.1); setGhost(95); wait(0.1); setGhost(96); wait(0.1); setGhost(97); wait(0.1); setGhost(98); wait(0.1); setGhost(99); wait(0.1); setGhost(100); wait(15); setGhost(99); wait(0.1); setGhost(97); wait(0.1); setGhost(95); wait(0.1); setGhost(90); wait(0.1); setGhost(85); wait(0.1); setGhost(80); wait(0.1); setGhost(75); wait(0.1); setGhost(70); wait(0.1); setGhost(65); wait(0.1); setGhost(60); wait(0.1); setGhost(55); wait(0.1); setGhost(50); wait(0.1); setGhost(45); wait(0.1); setGhost(40); wait(0.1); setGhost(35); wait(0.1); setGhost(30); wait(0.1); setGhost(25); wait(0.1); setGhost(20); wait(0.1); setGhost(15); wait(0.1); setGhost(10); wait(0.1); setGhost(7); wait(0.1); setGhost(5); wait(0.1); setGhost(4); wait(0.1); setGhost(3); wait(0.1); setGhost(2); wait(0.1); setGhost(1); wait(0.1); setGhost(0.5); wait(0.1); setGhost(0.3); wait(0.1); setGhost(0); } default { state_entry() { initAll(); } on_rez(integer start_param) { initAll(); } sensor(integer n) { numAvatarsNearby = n; nearestAvPosition = llDetectedPos(0); integer i; for (i=0; i<n; i++) { if (llDetectedKey(i) == ownerKey) { ownerPosition = llDetectedPos(i); } } } touch_start(integer n) { } collision_start(integer n) { } listen(integer channel, string name, key id, string msg) { } timer() { timer1(); } }
  2. Hello! Question to experienced scripters. Has anyone ever worked with RCX flight scripts? I have this Land Light script. Its for the prim cone of light. In the off state it is a small cone but when it is turned on it increases. And I want to redo it into a simple light source (no cone prim). I need to remove all the excess that affects the size of my light source and leave only the turning on/off the parameters of light. What needs to be removed? Can anyone help? /** * @author(s): Reconx86 * @created: 2016.04.12 * * RCX Landing Lights: * A script too manage Landing Lights * * @license: * You are allowed to share this script full-perm with others and even use it in your own projects. * But do not sell the script seperately nor as part of a script package */ integer lLandLight; integer rLandLight; string objName = "landing light"; integer links; integer objTotal; list lstPrimNames; rcxGetNames() { lstPrimNames = []; integer link_nr; integer links = llGetNumberOfPrims(); for (link_nr = 0; link_nr <= links; link_nr++) { lstPrimNames += [llGetLinkName(link_nr)]; } } integer rcxName2Link (string prim_name) { integer link_nr = llListFindList(lstPrimNames, [prim_name]); if (link_nr == -1) { link_nr = llGetListLength(lstPrimNames); llOwnerSay(llGetScriptName() + ": Prim \"" + prim_name + "\" not found"); } return link_nr; } lightsOn(integer num, integer navSide) { list params; params = [ PRIM_GLOW, ALL_SIDES, num * 0.1, PRIM_POINT_LIGHT, num, <1.0, 1.0, 0.0>, //reflection/tint 1.0, 2, 0.5, PRIM_COLOR, ALL_SIDES, <0.0, 0.5, 1.0>, num * 0.07//Light transparancy ]; if (num) {//When lights are turned on this returns TRUE params += [ PRIM_POS_LOCAL, <16.4, navSide * 3.5, -2.64>, PRIM_SIZE, <5.00000, 5.00000, 30.00000> ]; } else {//Executes when lights are turned off params += [ PRIM_POS_LOCAL, <3.9, navSide * 3.5, 0.0>, PRIM_SIZE, <1.00000, 1.00000, 1.00000> ]; } if (~navSide) { llSetLinkPrimitiveParamsFast(lLandLight, params); llSetLinkAlpha(lLandLight, 0.0, 0); } else { llSetLinkPrimitiveParamsFast(rLandLight, params); llSetLinkAlpha(rLandLight, 0.0, 0); } } default { state_entry() { links = llGetObjectPrimCount(llGetKey()); rcxGetNames(); lLandLight = rcxName2Link("RCX Landing Light (Port)"); rLandLight = rcxName2Link("RCX Landing Light (Starboard)"); lstPrimNames = []; } link_message(integer sender, integer num, string msg, key id) { if (msg == "#landing_light") { lightsOn(num, 1); lightsOn(num, -1); llSetScriptState(llGetScriptName(), FALSE); } } }
  3. Hi! Is it possible to animate light texture option in the features tab with script and how? Not just flickering, I want to use gif texture.
  4. Hello everyone, I have 2 questions : My first : Here is the script for opening and closing a door. However, the sound of the opening starts when you click and the closing sound once the door is closed. I would like the closing sound to start during the closing movement and not once closed. My second : Do you think I can add a script in a second prim linked so that the two objects follow the same movement? Can you help me please ? /* * Smooth Rotating Linked Door With Hinge * * By: Lyn Mimistrobell * Version: 1.1 * License: Do whatever you like with it, just don't blame me if you break it :) */ /* * Define the rotation in degrees, using the door prim's local coordinate * system */ vector ROTATION = <0.0, 0.0, 180.0>; /* * Define the position of the virtual hinge; usually this is half the door * prim's width and thickness */ vector HINGE_POSITION = <-0.4, 1.3, 0.0>; /* * Define how fast the door opens, in seconds */ float SECONDS_TO_ROTATE = 1.0; /* * Define after how much time the door should close automatically, in seconds; * set to 0.0 to disable autolmatic closing */ float AUTO_CLOSE_TIME = 10.0; /* * Define a sound that plays when the door starts to open; set to NULL_KEY * for no sound. */ key SOUND_ON_OPEN = "b814a289-a786-ef81-e5df-e0e9b9aeebab"; /* * Define a sound that plays when the door has closed; set to NULL_KEY * for no sound. */ key SOUND_ON_CLOSE = "00429879-654d-7925-9e66-5c1695324e58"; /* * Define the volume of the opening and closing sounds */ float SOUND_VOLUME = 1.0; /* * NORMALLY, THERE IS NO NEED TO CHANGE ANYTHING BELOW THIS COMMENT. IF YOU DO * YOU RISK BREAKING IT. */ integer gClosed; // Door state: TRUE = closed, FALSE = opened rotation gRotationClosed; // Initial rotation of the door (closed) vector gPositionClosed; // Initial position of the door (closed) vector gRotationPerSecond; // The amount to rotate each second doOpenOrClose() { /* * Only perform the rotation if the door isn't root or unlinked */ integer linkNumber = llGetLinkNumber(); if (linkNumber < 2) return; if (gClosed) { /* * Store the initial rotation and position so we can return to it. * * Rotating back purely by calculations can in the longer term cause the door * to be positioned incorrectly because of precision errors * * We determine this everytime before the door is being opened in case it was * moved, assuming the door was closed whilst being manipulated. */ gPositionClosed = llGetLocalPos(); gRotationClosed = llGetLocalRot(); /* * Play the opening sound and preload the closing sound */ if (SOUND_ON_OPEN) llPlaySound(SOUND_ON_OPEN, SOUND_VOLUME); } vector hingePosition = gPositionClosed + HINGE_POSITION * gRotationClosed; /* * Reset the timer and start moving */ llResetTime(); while (llGetTime() < SECONDS_TO_ROTATE) { float time = llGetTime(); if (! gClosed) /* * Invert the timer for closing direction */ time = SECONDS_TO_ROTATE - time; rotation rotationThisStep = llEuler2Rot(gRotationPerSecond * time) * gRotationClosed; vector positionThisStep = hingePosition - HINGE_POSITION * rotationThisStep; llSetLinkPrimitiveParamsFast(linkNumber, [PRIM_ROT_LOCAL, rotationThisStep, PRIM_POS_LOCAL, positionThisStep]); } /* * Set the new state */ gClosed = !gClosed; if (gClosed) { /* * Finalize the closing movement */ llSetLinkPrimitiveParamsFast(linkNumber, [PRIM_ROT_LOCAL, gRotationClosed, PRIM_POS_LOCAL, gPositionClosed]); /* * Play the closing sound and preload the opening sound */ if (SOUND_ON_CLOSE) llPlaySound(SOUND_ON_CLOSE, SOUND_VOLUME); if (SOUND_ON_OPEN) llPreloadSound(SOUND_ON_OPEN); } else { /* * Finalize the opening movement */ rotation rotationOpened = llEuler2Rot(ROTATION * DEG_TO_RAD) * gRotationClosed; vector positionOpened = hingePosition - HINGE_POSITION * rotationOpened; llSetLinkPrimitiveParamsFast(linkNumber, [PRIM_ROT_LOCAL, rotationOpened, PRIM_POS_LOCAL, positionOpened]); /* * Preload the closing sound */ if (SOUND_ON_CLOSE) llPreloadSound(SOUND_ON_CLOSE); /* * Set a timer to automatically close */ llSetTimerEvent(AUTO_CLOSE_TIME); } } default { state_entry() { /* * Assume the door is closed when the script is reset */ gClosed = TRUE; /* * These doesn't change unless the script is changed, calculate them once */ gRotationPerSecond = (ROTATION * DEG_TO_RAD / SECONDS_TO_ROTATE); /* * Preload the opening sound */ if (SOUND_ON_OPEN) llPreloadSound(SOUND_ON_OPEN); } touch_start(integer agentCount) { doOpenOrClose(); } timer() { llSetTimerEvent(0.0); /* * Close the door if it isn't already closed */ if (! gClosed) doOpenOrClose(); } }
  5. I need to create a door that opens only if the avatar holds the key. I have a regular door script, but what to do next? Please, do not bother to answer if you are not a scripter.
  6. Hi! Is it possible to animate light texture option (next to light color window) in the features tab (advanced lighting) with SCRIPT and how? Not flickering or intensity stuff, I want to use animated "gif" texture.
  7. Hello! I have a bubble gum script and I need to change it. I need to link the gum to the rezzed object, remove the animation for the avatar from it and leave only the effect of inflating the bubble and the sound of a pop. In general, so that the chewing gum worked for the rezzed object and not attached for the avatar. please tell me what needs to be changed! Thanks for help! init() { llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); llPreloadSound("ff0600f0-d8f4-20f6-52ec-a03bc520fee3"); llSetPos(<0,0,0>); llSetScale(<0,0,0>); } default { on_rez(integer num) { if(llGetAttached()) init(); } state_entry() { if(llGetAttached()) init(); } attach(key id) { init(); } run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { llSetTimerEvent(5 + (integer)llFrand(14)); } } timer() { llSetTimerEvent(0.0); llStartAnimation("express_kiss"); float itra; for(itra=0.004; itra<0.06; itra+=0.004) { llSetScale(<itra,itra,itra>); llSetPos(llGetLocalPos()+<0.0007,0.0,0.0>); } llPlaySound("ff0600f0-d8f4-20f6-52ec-a03bc520fee3", 1.0); llStopAnimation("express_kiss"); llSetScale(<0,0,0>); llSetPos(<0,0,0>); llSetTimerEvent(5 + (integer)llFrand(14)); } }
  8. Hello! Im a professional scripter with years of experience that offers a unique scripting service for second life, almost everything can be scripted or modified. Vehicles, breedables, RP systems, gambling, clothing , visuals, HUDs, tools, weapons, etc... Also PHP/SQL for external http server communication with databases. Contact me inworld with your request : Hao Zaytsev ( by notecard if possible ) Please do not reply this message or contact me throught the forum, better inworld! Cheers!
  9. 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!
  10. Please advise a good door script without a hinge for vehicle (boat)! what requirements should it meet? Thanks!
  11. Hello! help please to sort out! I'm trying to create a script for the 10 minutes demo rezzed object. what is better to use llSleep or llSetTimerEvent? and what's the difference basically in this case? llSleep seems shorter and simpler. thanks! default { state_entry() { llSleep(600); llDie(); } } or default { state_entry() { llSetTimerEvent(600); } timer() { llDie(); } }
  12. Hello! I'm trying to create a simple unpacker giving all content to the owner on rez and self-deleting. I have reviewed a bunch of scripts but they are all very difficult for a beginner. Please tell me how to start and where to go? that's what i have for now but it dont work... thanks for any help! default { on_rez(integer start_param) { llGiveInventory(llGetOwner(), llGetInventoryName(INVENTORY_OBJECT)); llDie; } }
  13. Hello. I'm VERY new to scripting in SL and I'm trying to create a very simple "secret" dungeon-type stone door, but can't seem to find quite what I'm looking for. Hope someone can help. I'm trying to create a simple, 1 prim rotating door. It's already set to accept a single sitter in a "pushing" position (with AVSitter) and makes the correct sound (4 seconds long) upon the avatar sitting. The only thing I want it to do now...upon sitting as well....is rotate slowly (for 4 seconds in time with the sound), 180 degrees around the Z axis and stop. Sounds pretty simple, but again, I'm totally new so I don't quite know what I'm looking for. I'd appreciate any help. Thank you!
  14. i have a sliding door script but it cannot be linked to other prims, does anyone have or can send me a link to where i can get a sliding door script that can be linked to other objects?
  15. Hello! Please help to combine these two scripts. I am trying to make a script for a linked door without a "hinge". I need to add the closing / opening sensor to the FIRST SCRIPT. Thank's for any help! FIRST SCRIPT (please help to add sensor here) // 2017 Maschinenwerk, Corp. // All Rights Reserved. /* * Define the rotation in degrees, using the door prim's local coordinate * system */ vector ROTATION = <0.0, 0.0, 80.0>; /* * Define the position of the virtual hinge; usually this is half the door * prim's width and thickness */ vector HINGE_POSITION = <-0.8, 0.05, 0.0>; /* * Define how fast the door opens, in seconds */ float SECONDS_TO_ROTATE = 1.0; /* * Define after how much time the door should close automatically, in seconds; * set to 0.0 to disable autolmatic closing */ float AUTO_CLOSE_TIME = 10.0; /* * Define a sound that plays when the door starts to open; set to NULL_KEY * for no sound. */ key SOUND_ON_OPEN = "e5e01091-9c1f-4f8c-8486-46d560ff664f"; /* * Define a sound that plays when the door has closed; set to NULL_KEY * for no sound. */ key SOUND_ON_CLOSE = "88d13f1f-85a8-49da-99f7-6fa2781b2229"; /* * Define the volume of the opening and closing sounds */ float SOUND_VOLUME = 1.0; /* * NORMALLY, THERE IS NO NEED TO CHANGE ANYTHING BELOW THIS COMMENT. IF YOU DO * YOU RISK BREAKING IT. */ integer gClosed; // Door state: TRUE = closed, FALSE = opened rotation gRotationClosed; // Initial rotation of the door (closed) vector gPositionClosed; // Initial position of the door (closed) vector gRotationPerSecond; // The amount to rotate each second doOpenOrClose() { /* * Only perform the rotation if the door isn't root or unlinked */ integer linkNumber = llGetLinkNumber(); if (linkNumber < 2) return; if (gClosed) { /* * Store the initial rotation and position so we can return to it. * * Rotating back purely by calculations can in the longer term cause the door * to be positioned incorrectly because of precision errors * * We determine this everytime before the door is being opened in case it was * moved, assuming the door was closed whilst being manipulated. */ gPositionClosed = llGetLocalPos(); gRotationClosed = llGetLocalRot(); /* * Play the opening sound and preload the closing sound */ if (SOUND_ON_OPEN) llPlaySound(SOUND_ON_OPEN, SOUND_VOLUME); } vector hingePosition = gPositionClosed + HINGE_POSITION * gRotationClosed; /* * Reset the timer and start moving */ llResetTime(); while (llGetTime() < SECONDS_TO_ROTATE) { float time = llGetTime(); if (! gClosed) /* * Invert the timer for closing direction */ time = SECONDS_TO_ROTATE - time; rotation rotationThisStep = llEuler2Rot(gRotationPerSecond * time) * gRotationClosed; vector positionThisStep = hingePosition - HINGE_POSITION * rotationThisStep; llSetLinkPrimitiveParamsFast(linkNumber, [PRIM_ROT_LOCAL, rotationThisStep, PRIM_POS_LOCAL, positionThisStep]); } /* * Set the new state */ gClosed = !gClosed; if (gClosed) { /* * Finalize the closing movement */ llSetLinkPrimitiveParamsFast(linkNumber, [PRIM_ROT_LOCAL, gRotationClosed, PRIM_POS_LOCAL, gPositionClosed]); /* * Play the closing sound and preload the opening sound */ if (SOUND_ON_CLOSE) llPlaySound(SOUND_ON_CLOSE, SOUND_VOLUME); if (SOUND_ON_OPEN) llPreloadSound(SOUND_ON_OPEN); } else { /* * Finalize the opening movement */ rotation rotationOpened = llEuler2Rot(ROTATION * DEG_TO_RAD) * gRotationClosed; vector positionOpened = hingePosition - HINGE_POSITION * rotationOpened; llSetLinkPrimitiveParamsFast(linkNumber, [PRIM_ROT_LOCAL, rotationOpened, PRIM_POS_LOCAL, positionOpened]); /* * Preload the closing sound */ if (SOUND_ON_CLOSE) llPreloadSound(SOUND_ON_CLOSE); /* * Set a timer to automatically close */ llSetTimerEvent(AUTO_CLOSE_TIME); } } default { state_entry() { /* * Assume the door is closed when the script is reset */ gClosed = TRUE; /* * These doesn't change unless the script is changed, calculate them once */ gRotationPerSecond = (ROTATION * DEG_TO_RAD / SECONDS_TO_ROTATE); /* * Preload the opening sound */ if (SOUND_ON_OPEN) llPreloadSound(SOUND_ON_OPEN); } touch_start(integer agentCount) { doOpenOrClose(); } timer() { llSetTimerEvent(0.0); /* * Close the door if it isn't already closed */ if (! gClosed) doOpenOrClose(); } } SECOND SCRIPT (sensor is here) float TIMER_CLOSE = 5.0; integer DIRECTION = -1; // direction door opens in. Either 1 (outwards) or -1 (inwards); integer DOOR_OPEN = 1; integer DOOR_CLOSE = 2; vector originalPos; door(integer what) { rotation rot; rotation delta; vector eul; llSetTimerEvent(0); if (what == DOOR_OPEN) { // llTriggerSound("doorOpen", 1); eul = < 0, 0, 90 * DIRECTION > ; //90 degrees around the z-axis, in Euler form } else if (what == DOOR_CLOSE) { // llTriggerSound("doorClose", 1); eul = < 0, 0, 90 * -DIRECTION > ; //90 degrees around the z-axis, in Euler form } eul *= DEG_TO_RAD; //convert to radians rotation rot = llGetRot(); delta = llEuler2Rot(eul); rot = delta * rot; llSetRot(rot); } default { on_rez(integer start_param) { llResetScript(); } state_entry() { originalPos = llGetPos(); llSensorRepeat("", "", AGENT, 5, PI, 1); } sensor(integer num_detected) { door(DOOR_OPEN); state open_state; } moving_end() { originalPos = llGetPos(); } } state open_state { state_entry() { llSensorRepeat("", "", AGENT, 5, PI, 1); } no_sensor() { door(DOOR_CLOSE); llSetPos(originalPos); state default; } sensor(integer num_detected) {} moving_start() { door(DOOR_CLOSE); state default; } }
  16. Why particles or hovertext remain even if script deleted?
  17. Hello folks, As the title say, i'm looking to be hired as scripter. I know well the Linden Scripting Language (LSL) and many others (especially web languages like PHP, HTML5, ASP.NET with MVC, JavaScript, NodeJS, Angular). If you need, i can also create projects in: C, C++, C#, Delphi, Perl, Python... I have many customers in SL (since approx 3 years) for custom full permissions LSL scripts mainly. I'm available for any small or mediums projects. I speak mainly French but i'm able to tchat in English (No english voice). I'm also good for security and hacking if you need these types of skills. If you are interested to work together, you can contact me directly in-world (UnderFawkes Resident).
  18. Всем привет. Некоторые пользователи тратят деньги или же часами ищут нужные скрипты для создания партиклей. На самом же деле, в клиенте Firestorm имеется специальный редактор, который облегчит вам процесс работы со скриптами.
  19. I am looking for a free or cheap script that will remember the sequence in which linked prims are touched. The reason I need this, is so that I can make a musical instrument that doesn't include songs, but the ability to create your own. There would be a dialog menu that pops up when you click the root prim. It asks you if you would like to record, or record with a loop, And if you choose option 1 you touch all the strings in the order you want them to play in, hit finish in the dialog menu, and it will play once. If you chose option 2, then the recorded sequence will play in a loop until you hit "stop" on the dialog menu. An extra thing I would like is the option to save your favorite sequences into a memory bank that has 10 slots. So you can easily switch to different sequences, allowing you to make a completely custom song. [Edit]: I would also like for sequences to be stored in notecards, along with a variable that sets the length of each note, so that the user can determine how long each note in their sequence will be. Defaulted to a whole note. This is for a prim object in which each string is a separate prim, that contains its own sound in its contents. So there needs to be communication between the linked prims and the root prim in order for this to work.. I am willing to pay for a script that does its job well.
  20. Hi there, I'm looking for a scripter to make an advanced script for an new idea that will create more simplicity for customers, which of course I will not share here :) Since most scripters are working by the hour and nobody can tell me how long it will take, I'm looking for a fixed price for the end product and/or a share in the profits. The script ownership must be exclusive, so no reselling afterwards. I'm used to working with designers/programmers RL and have completed the user story, so the programming will have a clear goal and set end result. Please IM me when you're able and available to take on this job. Thanks in advance, Truelove Infinity
  21. More specifically.... I can't figure out for the life of me what's causing this. I've tried taking everything off aside from what I physically can't remove aaand: This is driving me crazy. Anyone know what to do about this? It only happens when I try to move any direction (turn left, turn right, move forward/back etc). If I stay still, nothing happens. Crouching or jumping doesn't seem to affect it either.
  22. A day and a half ago I logged into SL and was trying to sit on something at my sim, but was unable to. I did not get an error i did not get something saying unable to sit. As soon as my avatar or anyone elses would sit, they would get kicked off the item without prompt. About 10 other people besides myself have looked everywhere for anything off or strange. The only time people can sit is when i disable scripts or when my avatar is not on the sim. I have submitted a ticket to linden labs but they are taking a while and it's making me really anxious. I'm looking to see if anyone has had any experience like this or has any answers because I am completely confused. I have even gone as far as to detached everything from my avatar and it makes no difference.
  23. Hello! I have a question. Can a single particle system use different textures one by one? or does each texture need a separate system? if it can, please tell me how to implement it. Thanks for any help!
  24. hey, im trying to make a script to check ages of people coming into my hangout, (rl ages not sl) but when i script LLaddtobanlist it doesnt, i can eject people but not add them to ban list, i was wondering if anyone could help as i also wanted to expand it to only ask people once,any sugestions? the script goes as followed string name; string detectedName; string dialogInfo = "\nWelcome to the little things hangout please answer the following questions and read the rules. are you ages 18 or over in real life?"; key id; integer dialogChannel; integer listenHandle; list buttons = ["-", "yes", "no", "no comment"]; default { state_entry() { dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) ); } collision_start(integer num_detected) { id = llDetectedKey(0); name = llKey2Name(id); llListenRemove(listenHandle); listenHandle = llListen(dialogChannel, "", id, ""); llDialog(id, dialogInfo, buttons, dialogChannel); llSetTimerEvent(180.0); // Here we set a time limit for responses detectedName = llDetectedName(0); dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) ); } listen(integer channel, string name, key id, string message) { if (message == "-") { llDialog(id, dialogInfo, buttons, dialogChannel); return; } llListenRemove(listenHandle); // stop timer since the menu was clicked llSetTimerEvent(0); if (message == "yes") { llSay(0, "Thank you please use the teleporter to explore the hangout."); } else if (message == "no") { llSay(0, "I'm sorry this hangout is for over 18 years old only, you will now be teleported home any issue with this please contact the hangout staff."); llAddToLandBanList(id,0.0); llEjectFromLand(id); } else { llSay(0, "I'm afraid we need to know the answer to this question to allow acess you will now be ejected feel free to return to answer this question again."); llAddToLandBanList(id,0.1); llEjectFromLand(id); } } timer() { // stop timer llSetTimerEvent(0); llListenRemove(listenHandle); llSay(0, "Sorry, we need a answer to this question we understand that you may have been afk at the time, unfortunatly you will be temp banned for one hour, any issue please contact [secondlife:///app/agent/47f37397-9596-41cb-8713-96c36ea2b685/about sophie]- with any issues. "); llAddToLandBanList(id,0.1); } }
  25. Hello, please help with the script. I make a speedometer and a compass and I decided to make them square planes. Script uses llSetLinkPrimitiveParamsFast. I got this texture repeats on corners. I decided to reduce the scale a little and leave a blank space on the sides so that when rotating at the corners the texture does not repeat. But I need to set the zoom. What do I need to add to this line to make it happen? Thanks a lot for any help. if(COMPASS_PRIM) llSetLinkPrimitiveParamsFast(COMPASS_PRIM, [ PRIM_TEXTURE, 1, "32865340-5893-3e24-c4a0-b511d39246c3", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, PI_BY_TWO]); ..................................................................... llSetLinkPrimitiveParamsFast(COMPASS_PRIM, [PRIM_TEXTURE, 0, "c6a241dd-709a-bf10-e7d0-b2bf49930d2a", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, our_direction_angle_rad * -1]);
×
×
  • Create New...