Jump to content

Sunbleached

Resident
  • Content Count

    229
  • Joined

  • Last visited

Community Reputation

66 Excellent

About Sunbleached

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. thank you very much for your answer! I am not sure what am i doing wrong, but it keeps giving me a syntax error... I guess i am doing something terribly wrong... i added these lines: integer iOwner_only_flag; integer Owner_only_flag; and to touch event: touch_start(integer total_number) { if ( (iOwner_only_flag && llDetectedKey(0) == llGetOwner() } || !Owner_only_flag)) // do stuff menu(llDetectedKey(0), "\nText for Menu.", MENU_MAIN); } and to buttons listener: else if (message == "Owner") { if ( llGetLinkName(llDetectedLinkNumber(0)) == "Button1" ) { iOwner_only_flag = !Owner_only_flag; } if ( llGetLinkName(llDetectedLinkNumber(0)) == "Button2" ) { iOwner_only_flag = !Owner_only_flag; } if ( llGetLinkName(llDetectedLinkNumber(0)) == "Owner" ) { iOwner_only_flag = !Owner_only_flag; } if ( llGetLinkName(llDetectedLinkNumber(0)) == "Public" ) { iOwner_only_flag = !Owner_only_flag; } }
  2. Hello again! I decided to try the option with owner/public. believe it or not but I saw this scheme in a dream tonight. I feel very close to it but I can’t turn it into a script. At this stage I do not understand how to set a = x or y. Please help! if button1 pressed check if a = x check owner (llDetectedKey(0)==llGetOwner()) if owner detected do stuff 1 else don't do anything else do stuff for everyone (do not check owner) if button2 pressed check if a = x check owner (llDetectedKey(0)==llGetOwner()) if owner detected do stuff 2 else don't do anything else do stuff for everyone (do not check owner) if button3 pressed set a = x <<<? Owner if button4 pressed set a = y <<<? Public
  3. Thank you very much for such a detailed answer! It really seems very complicated. But just in case, if I don’t master such a modification, is there an opportunity to just make an option public/owner only by button? if(llDetectedKey(0)==llGetOwner())? I am playing with llTextBox now, this is so cool!
  4. Hello! How to add an option to the menu script to add people to the list of those who are allowed to use this menu? This is for the wearable object, so that I can choose who else can call the menu besides me. Please help! list MENU_MAIN = ["BUT1", "BUT2" , "Add Person" , "Remove Person"]; //up to 12 in list integer menu_handler; integer menu_channel; menu(key user,string title,list buttons) { llListenRemove(menu_handler); //BugFix 5/2008 menu_channel = (integer)(llFrand(99999.0) * -1); menu_handler = llListen(menu_channel,"","",""); llDialog(user,title,buttons,menu_channel); llSetTimerEvent(30.0); //how long to wait for user to press a button before giving up and closing listen } default { state_entry() { //nada } touch_start(integer total_number) { menu(llDetectedKey(0), "\nText for Menu.", MENU_MAIN); } listen(integer channel,string name,key id,string message) { if (channel == menu_channel) { llListenRemove(menu_handler); //close listen llSetTimerEvent(0); //stop timeout timer if (message == "BUT1") { // DO SOMETHING } else if (message == "BUT2") { // DO SOMETHING } else if (message == "Add Person") { // WHAT TO DO HERE???.. } else if (message == "Remove Person") { // AND WHAT TO DO HERE??? } //else if (message == "Button") //{ // DO SOMETHING //} } } timer() //VERY IMPORTANT menu timeout { llListenRemove(menu_handler); //close listen llSetTimerEvent(0); //stop timeout timer } }
  5. Hello! How does unwrapping and the number of faces affect LI? I noticed that the same model with a different UV and the number of faces has a different LI. why is this happening and how to save resources on this?
  6. Hello! Thank you very much! Just tried it - fantastic! Very advanced! as i understood it uses even more faces than 1 to preload? Awesome! But what about my little script? Please help!
  7. Hello! I am trying to create a simple slideshow script with preload option based on this awesome example kindly given by Mollymews. integer index; integer number = llGetInventoryNumber(INVENTORY_TEXTURE); if (number) { string name = llGetInventoryName(INVENTORY_TEXTURE, index); if (name != "") llSetTexture(name, ALL_SIDES); index = (++index) % number; } Thats what i got now, but i have some concerns: ==> it supposed to preview on face 0 and show on face 2 (at least i thought so), but its vice versa. ==> i am not sure if llGetInventoryNumber(INVENTORY_TEXTURE); needed here. ==> preloading is going too fast. Please correct me if I was wrong? Is it enough to just swap faces? because the script works in general. integer index; string name; default { state_entry() { llSetTimerEvent(3.0); } timer() { integer number = llGetInventoryNumber(INVENTORY_TEXTURE); if (number) { string name = llGetInventoryName(INVENTORY_TEXTURE, index); if (name != "") llSetTexture(name, 2); index = (++index) % number; llSubStringIndex(name, "") != -1; llSetTexture(name, 0); } } }
  8. Wooow! Thank you so much! Now everything works perfectly!!! integer index; integer gFrameX = 0; integer gFrameY = 0; float gRate = 0.0; string name; setTex() { integer number = llGetInventoryNumber(INVENTORY_TEXTURE); if (number) { string name = llGetInventoryName(INVENTORY_TEXTURE, index); if (name != "") llSetTexture(name, ALL_SIDES); index = (++index) % number; llSubStringIndex(name, ".anim") != -1; list lParams = llParseString2List(name, [";"], []); gFrameX = llList2Integer(lParams, 1); gFrameY = llList2Integer(lParams, 2); gRate = llList2Float(lParams, 3); llSetTextureAnim(ANIM_ON | LOOP, ALL_SIDES, gFrameX, gFrameY, 0, 0, gRate); } else llSetTextureAnim(LOOP, ALL_SIDES, gFrameX, gFrameY, 0, 0, gRate); } default { state_entry() { llAllowInventoryDrop(TRUE); llSetTimerEvent(10.0); setTex(); } timer() { setTex(); } touch_start(integer touches) { llSetTimerEvent(10.0); setTex(); } changed(integer change) { if (change & (CHANGED_ALLOWED_DROP | CHANGED_INVENTORY)) setTex(); } } (may come in handy to somebody else!)
  9. Hello! Thank you for answer! I did this but something is wrong... integer count; setTex() { gTexture = llGetInventoryName( INVENTORY_TEXTURE, (integer)llFrand( llGetInventoryNumber(INVENTORY_TEXTURE)) ); llSetTexture(llList2Key(gTexture,count), ALL_SIDES ); ++count; count %=llGetListLength(gTexture); I can see that i misused llList2Key and llGetListLength ... but still dont get it
  10. Hello! Please help to remake the random order multiple GIF animation script into a script playing it in a strict order, one after another. I suspect this line but I can’t fix it yet gTexture = llGetInventoryName( INVENTORY_TEXTURE, (integer) llFrand(llGetInventoryNumber(INVENTORY_TEXTURE)) ); integer gFrameX = 0; integer gFrameY = 0; float gRate = 0.0; string gTexture; setTex() { gTexture = llGetInventoryName( INVENTORY_TEXTURE, (integer) llFrand(llGetInventoryNumber(INVENTORY_TEXTURE)) ); llSetTexture(gTexture, 2); if (llSubStringIndex(gTexture, ".anim") != -1) { list lParams = llParseString2List(gTexture, [";"], []); gFrameX = llList2Integer(lParams, 1); gFrameY = llList2Integer(lParams, 2); gRate = llList2Float(lParams, 3); llSetTextureAnim(ANIM_ON | LOOP, 2, gFrameX, gFrameY, 0, 0, gRate); } else llSetTextureAnim(LOOP, 2, gFrameX, gFrameY, 0, 0, gRate); } default { state_entry() { llAllowInventoryDrop(TRUE); llSetTimerEvent (10.0); setTex(); } timer() { setTex(); } touch_start(integer touches) { llSetTimerEvent (10.0); setTex(); } changed(integer change) { if (change & (CHANGED_ALLOWED_DROP | CHANGED_INVENTORY)) setTex(); } }
  11. Hi! I specifically made different options so that people could use it differently in these examples. Thank you, I hope you enjoyed it! It’s interesting to see your avatar from the particles!
  12. Hi! I want to share some particle systems: FIRE //* script_starts_here: FIRE SCRIPT ON/OFF TOUCH PUBLIC // integer run; default { touch_start(integer total_number) { if(run) { run = FALSE; llParticleSystem([]); } else { run = TRUE; llParticleSystem([PSYS_PART_MAX_AGE,2.50, PSYS_PART_FLAGS, 259, PSYS_PART_START_COLOR, <0.18, 0.16, 0.13>, PSYS_PART_END_COLOR, <0.59, 0.65, 0.62>, PSYS_PART_START_SCALE,<0.15, 0.15, 0.00>, PSYS_PART_END_SCALE,<0.77, 1.21, 0.00>, PSYS_SRC_PATTERN, 2, PSYS_SRC_BURST_RATE,0.00, PSYS_SRC_BURST_PART_COUNT,4, PSYS_SRC_BURST_RADIUS,0.00, PSYS_SRC_BURST_SPEED_MIN,0.07, PSYS_SRC_BURST_SPEED_MAX,0.35, PSYS_SRC_ANGLE_BEGIN, 1.65, PSYS_SRC_ANGLE_END, 0.00, PSYS_SRC_MAX_AGE, 0.0, PSYS_SRC_TEXTURE, "006d9758-81da-38a9-9be3-b6c941cae931", PSYS_PART_START_ALPHA, 0.40, PSYS_PART_END_ALPHA, 0.00, PSYS_SRC_ACCEL, <0.00, 0.00, 1.14>]); } } } //* script_ends_here SMOKE //* script_starts_here: SMOKE // default { state_entry() { llParticleSystem([PSYS_PART_MAX_AGE,2.50, PSYS_PART_FLAGS, 259, PSYS_PART_START_COLOR, <0.18079, 0.16000, 0.13761>, PSYS_PART_END_COLOR, <0.59811, 0.65541, 0.62564>, PSYS_PART_START_SCALE,<0.15062, 0.15062, 0.00000>, PSYS_PART_END_SCALE,<0.77423, 1.21800, 0.00000>, PSYS_SRC_PATTERN, 2, PSYS_SRC_BURST_RATE,0.00, PSYS_SRC_BURST_PART_COUNT,4, PSYS_SRC_BURST_RADIUS,0.00, PSYS_SRC_BURST_SPEED_MIN,0.07, PSYS_SRC_BURST_SPEED_MAX,0.35, PSYS_SRC_ANGLE_BEGIN, 1.65, PSYS_SRC_ANGLE_END, 0.00, PSYS_SRC_MAX_AGE, 0.0, PSYS_SRC_TEXTURE, "006d9758-81da-38a9-9be3-b6c941cae931", PSYS_PART_START_ALPHA, 0.40, PSYS_PART_END_ALPHA, 0.00, PSYS_SRC_ACCEL, <0.00, 0.00, 1.14>]); } } //* script_ends_here RAIN //* script_starts_here: RAIN / ON/OFF CHAT COMMAND Say : /10 start / stop // default { state_entry() { llListen(10,"","",""); } listen(integer chan, string name, key id, string msg) { if(msg=="stop") { llParticleSystem([]); } else if(msg=="start") { llParticleSystem([PSYS_PART_MAX_AGE,1.20, PSYS_PART_FLAGS, 259, PSYS_PART_START_COLOR, <0.73, 0.84, 0.79>, PSYS_PART_END_COLOR, <0.61, 0.76, 0.82>, PSYS_PART_START_SCALE,<0.10, 0.00, 0.00>, PSYS_PART_END_SCALE,<0.10, 3.69, 0.00>, PSYS_SRC_PATTERN, 8, PSYS_SRC_BURST_RATE,0.10, PSYS_SRC_BURST_PART_COUNT,25, PSYS_SRC_BURST_RADIUS,5.57, PSYS_SRC_BURST_SPEED_MIN,0.11, PSYS_SRC_BURST_SPEED_MAX,0.64, PSYS_SRC_ANGLE_BEGIN, 0.00, PSYS_SRC_ANGLE_END, 0.78, PSYS_SRC_MAX_AGE, 0.0, PSYS_SRC_TEXTURE, "06675bc5-e9b9-0557-7179-fbf7779faed8", PSYS_PART_START_ALPHA, 0.20, PSYS_PART_END_ALPHA, 0.75, PSYS_SRC_ACCEL, <-0.37, 0.45, -12.00>]); } } } //* script_ends_here Have fun!
  13. Hello! How to set a price on object and allow to buy it's content to group members only by script?
  14. @Profaitchikenz Haiku @animats Thank you again for your answers! I heared something about raycast to detect land and prims. But have no idea what it is. Maybe you can tell more, please?
×
×
  • Create New...