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 230 results

  1. hello I not know much of scripts, and made a hud of sounds with scripts of the wiki and used the (llLoopSoundMaster) but I have the problem that is not heard in the world when I append the hud to the avatar, the sound only I hear it, e read that I have to use (llTriggerSound) so you can hear the sound in the world, how can I join the (llLoopSoundMaster) + (llTriggerSound) help me please here I leave the script that I used the wiki: I need to add lltrigguersound to that script, someone who will help please // This integer (actually a boolean) will be used to manage the toggle effect. integer soundState = FALSE; // Change MasterLoop to the sound clip you want to use. string soundClip = "MasterLoop"; default { state_entry () { // Displays network "OFF" as floating text above the prim llSetText ("OFF", <1,0,0>, 1.0); } touch_start (integer num_detected) { // When touched, soundState inverts its current boolean value. 1 becomes 0, 0 becomes 1. soundState =! soundState; if (soundState) { // Run this code when entering soundState 'on' // Displays green "ON" as floating text above the prim llSetText ("ON", <0.1,0>, 1.0); llLoopSoundMaster (soundClip, 1.0); } else {// Run this code when entering soundState 'off' // When touched, stop sound & display network "OFF" as floating text. llSetText ("OFF", <1,0,0>, 1.0); llStopSound (); } } }
  2. Hello! Can someone help to add stop button to menu of music player script? for now i think i need to add it : string song_name = "Stop"; ///// if(msg == song_stop){llStopSound();return;} // This list is all you need to edit. List the names of the songs (each collection of sound files that makes one song) // followed by the length of those sound clips (each song should contain clips of equal length) // The list should be structured like so - // list songs = ["Madonna", 9.2, "Jackson", 9.8]; // The names of the songs must be identical to some part of the sound files used for that song like so - //// In the prim inventory (along with this script) - ////// Jackson 1 ////// Jackson 2 ////// ... ////// Jackson 23 ////// Madonna_1 ////// Madonna_2 ////// ... ////// Madonna_23 ////// In the script - ////// list songs = ["Madonna", 9.2, "Jackson", 9.8]; // The script will play the clips in alpha/numerical order so name them wisely. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////ONLY EDIT BELOW HERE/////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// list songs = ["Madonna", 9.2, "Jackson", 9.8]; // YUP! EDIT THIS BIT ;-) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////ONLY EDIT ABOVE HERE/////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// integer volume = 10; integer lis_count; integer playing; integer busy; integer part; integer lis; integer sl; float delay; list cancel = ["CANCEL"]; list playlist; list waiting; list song; string vol_str = "Volume"; string song_str = "Songs"; string song_name; list StrideOfList(list src, integer stride, integer start, integer end) { list l = []; integer ll = llGetListLength(src); if(start < 0)start += ll; if(end < 0)end += ll; if(end < start) return llList2List(src, start, start); while(start <= end) { l += llList2List(src, start, start); start += stride; } return l; } list Volumes(integer vol) { integer v = 0; list l = []; do { if(v != vol) l += [((string)v)]; } while((++v) <= 10); return l; } PageOne(key k, integer c) { llDialog(k, "\nAdjust the volume or select a song to play?", [vol_str, song_str] + cancel, c); } PlaySong(string n) { song = []; integer c = -1; string name = ""; do { if(llSubStringIndex((name = llGetInventoryName(INVENTORY_SOUND, (++c))), n) != -1) song += [name]; } while(name); delay = llList2Float(songs, (llListFindList(songs, [n]) + 1)); if((sl = llGetListLength(song))) { llPreloadSound(llList2String(song, (part = 0))); if(sl > 1) llPreloadSound(llList2String(song, 1)); playing = FALSE; llSetTimerEvent(0.01); } } integer Chan() { return llRound((llFrand(-5000000.0) + -500000.0)); } float ScaleVol(integer v) { return (v * 0.1); } Listen(integer c, key a) { lis = llListen(c, "", a, ""); } RemoveListen(integer b) { llListenRemove(lis); lis_count = 0; if(b) busy = FALSE; lis = 0; } SetListenTimer(integer p) { if(p) while(((++lis_count) * llRound(delay)) < 30); else { lis_count = 1; llSetTimerEvent(30.0); } } integer CheckWaitingRoom(integer c) { if(waiting) { key a = llList2Key(waiting, 0); if(!c) { RemoveListen(0); Listen((c = Chan()), a); SetListenTimer(playing); } PageOne(a, c); waiting = llDeleteSubList(waiting, 0, 0); return 1; } return 0; } default { on_rez(integer param) { llStopSound(); llResetScript(); } changed(integer change) { if(change & CHANGED_INVENTORY) llResetScript(); } touch_start(integer nd) { while(nd) { key agent = llDetectedKey(--nd); if(!busy) { busy = TRUE; integer channel = Chan(); SetListenTimer(playing); Listen(channel, agent); PageOne(agent, channel); } else { list a = [agent]; if(llListFindList(waiting, a) == -1) waiting += a; } } } listen(integer chan, string name, key id, string msg) { if(msg != llList2String(cancel, 0)) { SetListenTimer(playing); if(msg == vol_str) { llDialog(id, "\nChange the volume?\nThe current volume is set at \"" + ((string)volume) + "\"", cancel + Volumes(volume), chan); return; } if(msg == song_str) { string current = ""; if(playlist) { current = "\n\nThe songs currently queued are\n\"" + llList2String(playlist, 0) + "\" (currently playing)"; if(llGetListLength(playlist) > 1) current += "\n\"" + llDumpList2String(llList2List(playlist, 1, -1), "\"\n\"") + "\""; } llDialog(id, llGetSubString(("\nSelect a song to play?" + current), 0, 500), cancel + StrideOfList(songs, 2, 0, -1), chan); return; } if(llListFindList(Volumes(volume), [msg]) != -1) { llAdjustSoundVolume(ScaleVol((volume = ((integer)msg)))); PageOne(id, chan); return; } if(llGetListLength((playlist += [msg])) == 1) PlaySong((song_name = msg)); } if(CheckWaitingRoom(chan)) return; RemoveListen(1); } timer() { if(playlist) { if(!playing) { llSetTimerEvent(delay); playing = TRUE; } llPlaySound(llList2String(song, part), ScaleVol(volume)); if((++part) == sl) { if(llGetListLength(playlist) > 1) { song_name = llList2String((playlist = llDeleteSubList(playlist, 0, 0)), 0); llSleep(delay); PlaySong(song_name); } else { llSetTimerEvent(0.0); song_name = ""; playing = FALSE; playlist = []; } } else if(part == (sl - 1)) llPreloadSound(llList2String(song, 0)); else llPreloadSound(llList2String(song, (part + 1))); } if(lis && (!(--lis_count))) { if(!(CheckWaitingRoom(0))) RemoveListen(1); } } }
  3. 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!
  4. Hello! I have a question for ACS/KCP users. I make a truck and it is very important that you can walk inside the body. I created a simplified cubic physical shape with hollow inside, when I upload a model, I press the analyze, and everything goes fine. But the body turns into a convex hull when used, and I cannot walk inside. I manually set it to prim, but after reload it goes back to convex hull. I asked a question in a group, but did not get an answer. Generally a very bad service, yes, there is a site with a description, but it feels like they left me alone. Author never responds. Maybe it is a somekind keyword? I am using "solid" and "mesh" keywords - no help. Or I am even ready to switch to the old version (I am on 7.02). I use the viewer without Open Sim, so I don’t think that's the point. Any suggestions?
  5. ive started to build neon light signs. im looking for a creative light script that will: Script 1 - add color to sign running from one side of the object to the other in a smooth motion - option for one color or multiple colors in sequence Script 2 - smooth increase from 0 to 100 transparency and back to 0 on a loop if anyone has any pointers that would be amazing! im happy to buy a good script if it comes copy/trans
  6. I bought a texture changing HUD and i got it to work on objects that aren't linked together, but when i link them the texture changes everything not that one thing i just want to change. i don't know why it is doing that and what i am doing wrong. the script i'm using is ::jAS:: Texture Change HUD Script i'm not used to working with scripts so sorry if this seems like a silly problem https://gyazo.com/116aeead3caadcb847a3812e1f84262b << unlinked https://gyazo.com/c2f6f4c8559f2eb6f4c495831a61c4d5 << Linked
  7. Hello! I'm trying to create a script that allows you to simulate tossing the ball in your avatar's hand. the ball must be attached on the avatar, the hand holding the ball is animated, and a tossing animation is triggered through the timer, the ball moves up and down. Are there any suggestions how to do this?
  8. Hello! I have such a funny script, it works fine, but for some reason, every time I change the position of the object or just rez it from inventory, I have to reset the scripts. otherwise, the object either flies up to the sky or moves to its original position. why it happens? string animation; // the first animation in inventory will automatically be used // the animation name must be stored globally to be able to stop the animation when standing up integer k; integer flip = 1; list params; vector pos; integer link = 0; default { state_entry() { // set sit target, otherwise this will not work llSitTarget( < 0.0, 0.3, -1.0 > , <0.0, 0.0, -1.0, 1.0> );//*** ///ZERO_ROTATION params = llGetLinkPrimitiveParams(LINK_ROOT, [PRIM_POSITION]); pos = llList2Vector(params, 0); } changed(integer change) { if (change & CHANGED_LINK) { key av = llAvatarOnSitTarget(); if (av) //evaluated as true if not NULL_KEY or invalid { llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION); llSetTimerEvent(0.02 + llFrand(0.1)); } else // avatar is standing up { if (animation) llStopAnimation(animation); // stop the started animation llResetScript(); // release the avatar animation permissions llSetTimerEvent(0.0); } } } run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { animation = llGetInventoryName(INVENTORY_ANIMATION, 0); // get the first animation from inventory if (animation) { llStopAnimation("sit"); // stop the default sit animation llStartAnimation(animation); } } } timer() { llSetLinkPrimitiveParamsFast(LINK_ROOT, [PRIM_POSITION, pos + ((flip = -flip) * < 0.02, 0.01, 0.01 > )]); } }
  9. Hello! Someone can create the following script for a small reward 500 ls? I need a script that allows you to simulate tossing the ball in your avatar's hand. the ball must be attached on the avatar, the hand holding the ball, and a tossing animation is triggered through the timer, the ball moves up and down.
  10. Hello! I need to make an object that starts to vibrate when an avatar sits on it and it plays animation. I found such a script of vibration and animation, but how should they be combined together? vibration integer k; integer flip = 1; list params; vector pos; integer link = 0; default { state_entry() { params = llGetLinkPrimitiveParams(link, [PRIM_POSITION]); pos = llList2Vector(params, 0); } touch_start(integer total_number) { if (k = !k) llSetTimerEvent(0.02+llFrand(0.1)); else llSetTimerEvent(0.0); } timer() { llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_POSITION, pos + ((flip = -flip) * < 0.02, 0.01, 0.01 > )]); } } animation string animation; // the first animation in inventory will automatically be used // the animation name must be stored globally to be able to stop the animation when standing up default { state_entry() { // set sit target, otherwise this will not work llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION); } changed(integer change) { if (change & CHANGED_LINK) { key av = llAvatarOnSitTarget(); if (av) //evaluated as true if not NULL_KEY or invalid llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION); else // avatar is standing up { if (animation) llStopAnimation(animation); // stop the started animation llResetScript(); // release the avatar animation permissions } } } run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { animation = llGetInventoryName(INVENTORY_ANIMATION,0); // get the first animation from inventory if (animation) { llStopAnimation("sit"); // stop the default sit animation llStartAnimation(animation); } } } }
  11. Hello! I am trying to create a script with something like an alarm that sends me a message when someone comes to visit me in my absence. I managed to write something but its not ok. It sends messages all the time while person in range, and I only need one time alert. and at the same time, if a person leaves the range and comes back, the alarm must be triggered again. how to do it? That's what i managed to write so far float range = 10.0; // in meters float rate = 10.0; // in seconds default { state_entry() { llSensorRepeat( "", "", AGENT, range, TWO_PI, rate ); } sensor( integer number_detected ) { llInstantMessage( llGetOwner(), "ALERT!" ); } }
  12. 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(); } }
  13. 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); } } }
  14. 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.
  15. 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(); } }
  16. 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.
  17. 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.
  18. 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)); } }
  19. 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!
  20. 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!
  21. Please advise a good door script without a hinge for vehicle (boat)! what requirements should it meet? Thanks!
  22. 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(); } }
  23. 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; } }
  24. 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!
  25. 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?
×
×
  • Create New...