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

  1. Hello! I need to create a script that allows to loop a 10 seconds sound clip from the UUIDs list in the script (or one notecard). and to switch to the next loop when clicked, (please, note - not full song player - only one 10 seconds loop) with the ability to turn on / off. any suggestions? Scheme, how i see it: start list: bananas - uuid1, vol 1.0; madonna - uuid2, vol 1.0; ... jackson - uuid3, vol 1.0; on/off ?; if touched loop next uuid; end. Yes, I already asked and really hate to do this, but now I decided to try to create my own script, because I did not find a suitable one from the existing ones.
  2. Hello! need a script for linkset of several objects, allowing one object to emit light and turn off for the rest in a circular chain. I managed to add a light to all objects but I can’t turn of for the rest. What is the way to do this?
  3. Hello, is there an open source music player script for looped playback of ten-second sounds from the UUIDs in config notecard or script itself? like a boombox script, but not with a bunch of sounds in the content, I need not whole songs but short loops, "best" selected looped moments. so that users can add their own "song loops". And with any way to switch to the next track. If menu - just perfect!
  4. Hello! I want to embed the brightness and glowing of certain surfaces in this door script to simulate the inclusion of light in the refrigerator. It will be two prims - the refrigerator itself and the door. only two faces will be lit accordingly. Advise how to do this? and another question. Will it work if the fridge itself is part of the linket? The script is written by the forum participant string door_sound = "743e6ba4-65a8-d641-da12-6dc20e37eceb"; integer intSwing =90; rotation rotSwing; vector vOffset; default{ state_entry(){ rotSwing = llEuler2Rot(<0.0,0.0,(float)intSwing>*DEG_TO_RAD); //90 degrees on the z axis vector size = llGetScale(); vOffset = <(size.x*//0.5 .45),(size.y*.5),1>;//open away from someone standing in front of face 2 -- that is, in front of the prim -- hinged on the left. } touch_start(integer total_number){ llPlaySound (door_sound, 1.0); list l = llGetPrimitiveParams([PRIM_POS_LOCAL,PRIM_ROT_LOCAL]); vector v = llList2Vector(l,0); rotation r = llList2Rot(l,1); llSetPrimitiveParams([PRIM_POS_LOCAL,v+(vOffset-vOffset * rotSwing)*r,PRIM_ROT_LOCAL,rotSwing*r]); rotSwing.s*=-1; } }
  5. Hello Admin/Moderator/Guys, I wanna know how to make people cant inspect our items.. It's easy to inspect someone's clothing by right clicking their item n click inspect to know their item's brand.. I have a friend who always copy my style by inspect me again n again without permission i think, because tomorrow he will end up with the brands i worn So..I'm Firestorm user, is there a menu in firestorm viewer to block people's inspect? or a script, or any other way? Thank you /\
  6. Hello! I came across a vehicles in which the sound comes not from the root prim but from another, for example from a motor. but at the same time in the motor prim, I did not find the script. How to make the sound go from not root prim and from child prim in a link set without an additional script?
  7. Hello, is it possible to get a group invitation looking like in the screenshot by clicking on an object? How to achieve that? Regards
  8. Hello! Is it possible to alter the script of the aviation speedometer, showing the horizontal speed in the speedometer, showing the vertical speed by rotating the texture?
  9. Hello, I need someone who can help me out with a custom script. The HUD will look similar to the attached one. Please PN me, if you are interested. Name your price and the time you can start and need to finish. Make a list of all needs from me. Regards
  10. In features you can make an object create light, I have been trying for some time to find a way to control the light so that it doesn't go through objects (i.e. Floors if it's a ceiling light, walls if it's a street light, and even cove lights which are only supposed to light up the side of wall they are directed at.) I've been playing for almost 12 years and I never looked to deep into it because traditionally we used glow and a secondary object with a gradient or shadow texture. In hopes of finding a better solution I was told to post here and I hope y'all can help or at the very least tell me there really is no way to control the light function and I will start learning to bake multiple textures(light on & light off)
  11. Hi there! Just wondering... how do I script an object to only be interactive for people wearing a specific group tag?
  12. Hello. First let me say I'm still pretty new to building, scripting, etc., so I may be a little naive, but... Okay, let me try to explain what I've got so far....First, I have a link set of lights (prims)...each prim has a script that changes to one of a set group of colors. I've added an invisible prim as the root which acts as switch for all of the lights with the same script inside. So each prim color can be changed individually AND they'll all change to the SAME color if the root prim is touched instead. I've also found and added a script that turns the prim "projector" light on and off along with "full bright"....also by touch. This only works in the individual lights, not as a set via the root prim, which I'm fine with. All of this works and works together beautifully. The only thing I'm looking for now is a way to synchronize the color of the projected light with the chosen color of the prim. So if I choose to make all the lights blue, then click them all to "turn them on", I'd like the projector light to turn on blue automatically as well. Not sure if that's even possible...or if it is, whether or not that would conflict with any of the other currently working scripts. But any help or advice....or scripts, lol...would be greatly appreciated. Thank you!
  13. Hello! I have a question for all users of TX Gear scripts. How to add a passenger seat and adjust the position? Please help. ................... SOLVED!
  14. Hello! I need to create four parts linked to house sliding door like on picture. all parts move frome one position in the linkset to another. Any suggestions greatly appreciated!
  15. Hello! I need to create a script for the four parts door sliding. the door must be linked to the building. Each part do not enter one into the other, but come in behind one after another. Parts can simply move from one position of all parts to another. Any suggestions greatly appreciated! Please, help! reward 500 ls.
  16. Hello! There is such a script unpacker. for me it works fine, but when I give it to a friend, the first time it unpacks twice, and then as usual. why it happens? list lContents; string strFolderName = "A folder of goodies";// change to the name you want for your folder default { state_entry() {//some preliminary work to set things up //first, populate the lContents list string strThisScript = llGetScriptName();//note the name of this script, since you don't want to give that as part of the folder integer max = llGetInventoryNumber(INVENTORY_ALL);//note the number of items in the object's inventory integer counter = 0; do{ string str = llGetInventoryName(INVENTORY_ALL, counter);//check the name of each item if(str!=strThisScript){//and if it's not this script lContents +=[str];//add the name to lContents } } while(++counter < max);//and keep on doing this, advancing the counter each time, until all items have been checked. if(llStringLength(strFolderName)== 0){//sanity check -- if no folder name is provided strFolderName = llGetObjectName();//then use the name of this object for the folder } } changed(integer change) { if(change & CHANGED_INVENTORY){//if the contents of the object's inventory change llResetScript();//then reset the script in order to rebuild the list } else if(change & CHANGED_OWNER){//if the object's owner changes, give the folder to the new owner llGiveInventoryList(llGetOwner(), strFolderName,lContents);//give the folder to the new owner } } attach(key id) { if(id){//if someone attaches the object llGiveInventoryList(id, strFolderName,lContents);//give them the folder } } }
  17. Hello! I want to add a stop button to menu of this full length multi song player. how to do it if not difficult? // 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); } } }
  18. 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 (); } } }
  19. 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); } } }
  20. 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!
  21. 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?
  22. 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
  23. 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
  24. 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?
  25. 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 > )]); } }
×
×
  • Create New...