Jump to content

Xiija

Resident
  • Posts

    912
  • Joined

  • Last visited

Everything posted by Xiija

  1. try adding something to the 'experiment" section..? touch_start(integer n) { llOwnerSay("Doing experimental stuff"); // add your experiment here vector offset = <1.0,1.0,2.0>; llSetPos(offset); //this will move the obj 1m forward, 1m side, and 2m up llSetTimerEvent( 10 ); }
  2. use a timer & loop thru them?..kinda like so... // send on / off command..... llSetTimerEvent(0.1) or llSetTimerEvent(0.0) timer() { integer n; llSetLinkTextureAnim(n, FALSE, ALL_SIDES, 0, 0, 0.0, 0.0, 1.0); ++n; if(n >3){n = 1;} llSetLinkTextureAnim(n, ANIM_ON | SMOOTH , ALL_SIDES, 1, 1, 1, 1, 1); llSetTimerEvent(0.1) }
  3. yes. they will work when not attached, the sensor will pick them up in world
  4. you need something like this, an empty list that can be set to match your pre defined ones? list currList: if (action == "first") { currList = first; integer length = llGetListLength(currList); }
  5. if this is for a door / box, you could use a touch event, since Someone will be around to do the opening...the sensor would work on touch, and scan the area for UUID's..you wouldn't need to listen for objects.? //a list of your key UUID's list keys = ["8e611fd9-5766-5c9a-a688-0db115cb8ebc", "26a0a76c-f7b6-c62d-c571-2f9f156bfc0e", "38f40c0f-1bad-5834-ceef-feb7b8f166b1", "38f40c0f-1bad-5834-ceef-feb7b8f166b2"]; default { state_entry() { } touch_start(integer total_number) { llSensor( "", NULL_KEY, ( AGENT_BY_LEGACY_NAME | PASSIVE | ACTIVE ), 3.0, PI ); } sensor( integer detected ) { integer lock = 0; while(detected--) { key dKey = llDetectedKey(detected); if (~llListFindList(keys,[(string)dKey])) { ++lock; llOwnerSay("Lock at: " + (string)lock); } } if(lock == 4) { llOwnerSay("OPEN"); // send open command here } } }
  6. since this is a forum to help people with scripts, here is a beginning for you...you will have to modify it to get it to work Add more "if" messages for the number of prims you have, and notice that the root is link 1...so alert 1 will be changing link2 etc... integer listen_handle; default { state_entry() { listen_handle = llListen(0, "", llGetOwner(), ""); //turn on a listen llSetLinkPrimitiveParamsFast( LINK_ROOT,[ PRIM_GLOW,ALL_SIDES,1.0]) ; //set the root to glow } touch_start(integer total_number) { } listen( integer channel, string name, key id, string message ) //the listen event to catch what was said { if(message == "alert 1") { llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN,[ PRIM_GLOW,ALL_SIDES,0.0]); //turn all child glows off llSetLinkPrimitiveParamsFast( 2,[ PRIM_GLOW,ALL_SIDES,1.0]) ; //change glow on prim 2,first one after root } if(message == "alert 2") { llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN,[ PRIM_GLOW,ALL_SIDES,0.0]); llSetLinkPrimitiveParamsFast( 3,[ PRIM_GLOW,ALL_SIDES,1.0]); } } }
  7. to change more than one face, you need to use a loop? integer face; list faces = [2,4]; integer len = llGetListLength(faces); integer n; for(n = 0;n < len;++n) { face = llList2Integer(faces,n); llSetAlpha(0.0,face); }
  8. some free open source scripts here... http://www.free-lsl-scripts.com/cgi/freescripts.plx?Category=Drop%20Box
  9. Mesh stairs or staircases, Mesh bleachers for sports events, a low prim mesh house frame with windows. a Mesh security bot looking thing to put our Orb scripts in. a Mesh tv or radio/media center to put our media scripts in.
  10. commmented, if ya have any questions, plz post em here
  11. Something like this....? integer k; // on - off toggle - same as k = 0 ..if not defined, variables are blank or 0integer n = 1; // variable for which link numberdefault{ touch_start(integer num_detected) { // every time you touch, k is toggled k = !k; //touch toggle-either 1 or 0 this is BOOLEAN if k=0, k will become 1, if 1, it becomes 0 if(k) // if k is true (not zero or empty) {llSetTimerEvent(0.1);} //if k is 1 - send to timer in tenth of a second else { llSetLinkAlpha( LINK_SET, 1.0, ALL_SIDES);llSetTimerEvent(0.0);n = 1;} // if k is 0 - (off) make linkset all visible // turn off timer and reset n to 1 } timer() { llSetLinkAlpha( LINK_SET, 0.0, ALL_SIDES); // make linkset (all) invisible llSetLinkAlpha(n, 1.0, ALL_SIDES); // n starts as 1 ( see top declaration) -set link 1 visible ++n; //add one to variable n every time the timer fires if(n > 3) // if n is more than number of prims(links) {n = 1;} //set n back to the first link number llSetTimerEvent(1.0); // make the timer fire every second } // this is stopped when you touch again & timer event is set to 0} ETA ( edited to add) commented
  12. for your HUD, mebbe try llDetectedTouchST ? http://wiki.secondlife.com/wiki/LlDetectedTouchST if your hud has a texture with the range, you can detect the surface touch on the texture?
  13. you need a run time event also you can use a timer, or put the request in your listen? if (message == "on") { llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); } run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { llStartAnimation("animation"); } }
  14. hrm..mebbe this? in your couch, add a few things in state_entry.... key myKey = llGetKey(); vRed = <1,0,0>; in the listen..... list cmd = llParseString2List(message,[" "],[" "]); if(llList2Key(cmd,0) == myKey) { string newColor = llList2String(cmd,1); if(newColor == "red") { llSetColor(vRed, ALL_SIDES); } } ___________________________ in the HUD... in the listen event... key sendID = id; and in the HUD touch start..... llSay(-5256, (string)sendID + " " + color); ______________________________ each item has a key,,,,so you can respond to them not by name, but by each individual object?
  15. if you have Firestorm viewer, you can use areasearch, (world tab>area search) set the owner search string option to her name, and double click each of her items to have it highlighted ..?
  16. just change a few things...put a variable in the if statements and use touch to say the variable? string color;default{ state_entry() { llListen(-5872695687565, "", NULL_KEY, ""); } touch_start(integer num) { llSay(-5872695687565, color); color = " "; } listen( integer channel, string name, key id, string message ) { if(llToLower(message) == "exit") { llSetAlpha(0.0, ALL_SIDES); color = " "; } else if(llToLower(message) == "chaircushion") { llSetAlpha(1.0, ALL_SIDES); color = "red"; } else if(llToLower(message) == "chairlegs") { llSetAlpha(1.0, ALL_SIDES); color = "red"; } else if(llToLower(message) == "chairbody") { llSetAlpha(1.0, ALL_SIDES); color = "red"; } }} or if all colors are the same... string color;default{ state_entry() { llListen(-5872695687565, "", NULL_KEY, ""); } touch_start(integer num) { llSay(-5872695687565, color); color = " "; } listen( integer channel, string name, key id, string message ) { if(llToLower(message) == "exit") { llSetAlpha(0.0, ALL_SIDES); color = " "; } else if(llToLower(message) == "chaircushion" || llToLower(message) == "chairlegs" || llToLower(message) == "chairbody") { llSetAlpha(1.0, ALL_SIDES); color = "red"; } }}
  17. just for practice....you can mod this to fit your needs wasn't too sure about how you wanted to change the positions...? integer iLine; integer count; key kQuery; key kQuery2; key kQuery3; integer maxLines; list Heard; string NC; string Anim; string ItemName; string NCD; string animation; string currAnim; // Will look for first 2 words chatted: ex: sit sit3, or sit bored // the first item is the notecard name, the second is the animation in it (no spaces in either)default{ state_entry() { count = llGetInventoryNumber(INVENTORY_NOTECARD); llListen(0, "", llGetOwner(), ""); animation = "sit"; llSitTarget(<0.0, 0.0, 0.6>, ZERO_ROTATION); } touch_start(integer total_number) { } listen( integer channel, string name, key id, string message ) { Heard = llParseString2List(message,[" "],[" "]); NC = llList2String(Heard,0); Anim = llList2String(Heard,1); string ItemName; integer x; for(x = 0;x < count;x++) { ItemName = llGetInventoryName(INVENTORY_NOTECARD, x); if (ItemName == NC ) { NCD = ItemName; iLine = 0; kQuery = llGetNumberOfNotecardLines(NCD); kQuery2 = llGetNotecardLine(NCD, iLine); } } } dataserver(key query_id, string data) { if (query_id == kQuery) { maxLines = (integer)data; } //_________________________________________________ if (query_id == kQuery2 || query_id == kQuery3) { if (data == EOF) { llOwnerSay("None Found"); iLine = 0; } else { iLine++; if( data == Anim) { currAnim = data; key av = llAvatarOnSitTarget(); llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION); } else { integer z; for(z = 0;z < maxLines;z++) { kQuery3 = llGetNotecardLine(NCD,iLine); } } } } } run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { llStopAnimation(animation); llStartAnimation(currAnim); animation = currAnim; llOwnerSay("Current ANimation: " + currAnim); } } }
  18. a few updater examples here... http://www.free-lsl-scripts.com/cgi/freescripts.plx?Category=Upgrade%20Script
  19. incomplete ? hrm.., it works for me. the listen fires every time the switch is touched, regardless of what the message is. should act just like a touch in the pool cover....
  20. you need 3 changes in your pool cover stretching script: ___________________________________________ above the red word default that is in your script, put this.. integer chan = -9876; in the state_entry() add this line... llListen(chan,"", "",""); and where you see this... touch_start(integer num) change it to this.... listen(integer chan, string name, key id, string mes) _______________________________________ then, just use Rolig's script in a small prim you made for the control (or you could post the pool cover script & we could change it for you?)
  21. you can get an empty AO, and add the anims to it... https://marketplace.secondlife.com/p/ZHAO-II/1593159 read the info notecard to find out how...
  22. try searching for chalk board ? https://marketplace.secondlife.com/products/search?utf8=%E2%9C%93&search[category_id]=&search[maturity_level]=G&search[keywords]=chalk+board
  23. One of the best places to make new friends is SLRDA, the Second Life Roller Derby Association. The community is made up of all kinds of people, and can introduce you to new friends & places. Roller Derby is an SL sport, but there are photographers, builders, skate & clothing designers, scripters.DJ's,..people from all interests come together in this community. If you are interested, please search inworld for SLRDA, and join the group. It's free, and there are open skate nights every friday at 6pm slt. Come meet some new friends :)
  24. something like this?...this should negate any rotaions made by the root, keeping your horizon prim level? put this in the root:.... child prim number is 2.... after you have rotated, get the new rotation and send the negative rotation to the child rotation rot = llGetRot() ; llSetLinkPrimitiveParamsFast( 2 , [PRIM_ROT_LOCAL, ZERO_ROTATION / rot ]); ther is a page on rotaions here http://wiki.secondlife.com/wiki/Rotation
  25. in your listen, change the button name to a key? (this means the textures in the main inventory would have to be named Vic_101, etc) listen( integer channel, string name, key id, string message ) { key uuid = llGetInventoryKey(message); } //then change the SLPPF llSetLinkPrimitiveParamsFast(i,[ PRIM_TEXTURE, ALL_SIDES, uuid, <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0 ]);
×
×
  • Create New...