Jump to content

Tattooshop

Resident
  • Posts

    365
  • Joined

  • Last visited

Everything posted by Tattooshop

  1. I have a related question. Is it possible to put on HUD on rez automatically without asking avatar permission? Thanks!
  2. I tried changed event before on_rez event but it doesnt work
  3. NM fellows! Its fine now! Fixed (edited)
  4. Thanks very much! I removed changed event and it seems work fine!
  5. Hello! I am making a script that allows to automatically attach (and later to detach) the HUD to the avatar if it was rezzed to the ground. However, this only happens if the avatar first wears the HUD at least once in the usual way (right click-wear). If the avatar rez HUD first, an invitation "... would like to: Attach to your avatar" appears but nothing happens. It only happens when I give the HUD to my alt to test! What am I missing? integer ATTACH_POINT = ATTACH_HUD_CENTER_1; // HUD attachment point default { on_rez(integer n) { if (!llGetAttached()) { llOwnerSay("Please allow me to be on your HUD!"); llRequestPermissions(llGetOwner(), PERMISSION_ATTACH); } } run_time_permissions(integer permissions) { if (permissions & PERMISSION_ATTACH) { llAttachToAvatar(ATTACH_POINT); } } attach(key id) { if (id) { llSetRot(llEuler2Rot( < 0, 0, 0 > * DEG_TO_RAD)); } } touch_end(integer total_number) { string button = llGetLinkName(llDetectedLinkNumber(0)); if (button == "detach") { if (llGetAttached()) { llRequestPermissions(llGetOwner(), PERMISSION_ATTACH); llDetachFromAvatar(); } } } state_entry() { llSetRot(llEuler2Rot( < 0, 0, 0 > * DEG_TO_RAD)); } changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } }
  6. Thank you so much! but where to add it? If (message == "reset") requests = [];
  7. Hello! This is a DJ song request tool and I am trying to add a script reset option to update the song request list for this script. I am trying to add a line like this but I get an error every time. it is not clear where to insert it. Thanks in advance! listen( integer channel, string name, key id, string message ) if (message == "reset") llResetScript(); integer DEDICATION_CHANNEL = 98; list requests = []; default { touch_start(integer total_number) { if(llDetectedKey(0) != llGetOwner()) jump user; if(llGetListLength(requests) == 0) { llOwnerSay("No dedications are currently lined up."); return; } llOwnerSay("---------------— BEGIN REQUESTS —----------------"); integer itra; for(itra=0; itra<llGetListLength(requests); itra+=3) { llOwnerSay(llList2String(requests, itra) + " requested the song: " + llList2String(requests, itra+1)); llOwnerSay("With the dedication: " + llList2String(requests, itra+2)); if(itra+3<llGetListLength(requests)-1) llOwnerSay("-------------------------------------------------------"); } llOwnerSay("----------------— END REQUESTS —-----------------"); return; @user; integer comHandle = llListen(DEDICATION_CHANNEL, "", llDetectedKey(0), ""); llInstantMessage(llDetectedKey(0), "To request the song \"That's Life - Frank Sinatra\" with the dedication \"For my friend Lydia, I love you!\", you would type into the main chat:\n\n/" + (string)DEDICATION_CHANNEL + " That's life - Frank Sinatra%For my friend Lydia, I love you!\n\nThe forward-slash and the number after the slash are important."); } listen( integer channel, string name, key id, string message ) { if(channel != DEDICATION_CHANNEL) return; requests += (list)name + llList2List(llParseString2List(message, ["%"], [""]), 0, 0) + llList2List(llParseString2List(message, ["%"], [""]), 1, 1); llInstantMessage(id, "Thank you! Your dedication has been stored and will be played at the DJ's convenience."); } }
  8. Thanks! I'm sure the number is 2, I even tried this version with timer but now it doesn't work at all, no particles system() { llLinkParticleSystem(link, [PSYS_PART_MAX_AGE, 3.00, PSYS_PART_FLAGS, 327, PSYS_PART_START_COLOR, < 0.80900, 0.61643, 0.19086 > , PSYS_PART_END_COLOR, < 0.95090, 0.23954, 0.04910 > , PSYS_PART_START_SCALE, < 0.22837, 0.22108, 0.00000 > , PSYS_PART_END_SCALE, < 0.40827, 0.38748, 0.00000 > , PSYS_SRC_PATTERN, 2, PSYS_SRC_BURST_RATE, 0.00, PSYS_SRC_BURST_PART_COUNT, 6, PSYS_SRC_BURST_RADIUS, 1.47, PSYS_SRC_BURST_SPEED_MIN, 0.08, PSYS_SRC_BURST_SPEED_MAX, 0.02, PSYS_SRC_ANGLE_BEGIN, 0.95, PSYS_SRC_ANGLE_END, 0.00, PSYS_SRC_MAX_AGE, 0.0, PSYS_SRC_TEXTURE, "208da827-c002-c83f-2e9e-c0d4abee9c3e", PSYS_PART_START_ALPHA, 1.00, PSYS_PART_END_ALPHA, 1.00, PSYS_SRC_ACCEL, < 0.00, 0.00, 0.42 > , PSYS_PART_START_GLOW, 0.10, PSYS_PART_END_GLOW, 0.00, PSYS_SRC_TARGET_KEY, llGetLinkKey(llGetLinkNumber() + 1) ]); } integer link; default { state_entry() { llSetTimerEvent(1); } timer() { system(); } }
  9. Hi! The picture shows how this works when it is not linked and the target key UUID is used. And this is how it should look in the end.
  10. Hello! I am making a particle system for a linkset where the particles go from bottom to top towards the target, but when I link them there is a problem, the particles do not go to the target. how to correctly specify the target for a linkset in this case? ( Target link number is 2 ) integer link; default { state_entry() { key target = llGetLinkKey(2); llLinkParticleSystem(link, [PSYS_PART_MAX_AGE, 3.00, PSYS_PART_FLAGS, 327, PSYS_PART_START_COLOR, < 0.80900, 0.61643, 0.19086 > , PSYS_PART_END_COLOR, < 0.95090, 0.23954, 0.04910 > , PSYS_PART_START_SCALE, < 0.22837, 0.22108, 0.00000 > , PSYS_PART_END_SCALE, < 0.40827, 0.38748, 0.00000 > , PSYS_SRC_PATTERN, 2, PSYS_SRC_BURST_RATE, 0.00, PSYS_SRC_BURST_PART_COUNT, 6, PSYS_SRC_BURST_RADIUS, 1.47, PSYS_SRC_BURST_SPEED_MIN, 0.08, PSYS_SRC_BURST_SPEED_MAX, 0.02, PSYS_SRC_ANGLE_BEGIN, 0.95, PSYS_SRC_ANGLE_END, 0.00, PSYS_SRC_MAX_AGE, 0.0, PSYS_SRC_TEXTURE, "208da827-c002-c83f-2e9e-c0d4abee9c3e", PSYS_PART_START_ALPHA, 1.00, PSYS_PART_END_ALPHA, 1.00, PSYS_SRC_ACCEL, < 0.00, 0.00, 0.42 > , PSYS_PART_START_GLOW, 0.10, PSYS_PART_END_GLOW, 0.00, PSYS_SRC_TARGET_KEY, target ]); } }
  11. I thank you very much for your answers! Now everything is just perfect!
  12. Ok, I think I found how to add this node and the effect is clearly visible in the Cycles render, but when I switch to Blender render to bake the texture, the effect disappears and the texture is white again. Is it possible to do this in Blender render?
  13. Hello! Thanks for the reply! Could you please explain a little more about the chain of nodes? What have I missed?
  14. Hello! When I bake the AO map in a Blender, my model is too white and uniform, like a plain white sheet of paper. How can I add a slight graininess to the texture all over the model without changing the shadows to make it look more natural? I am still on Blender 2.79 and use Blender Render to bake AO.
  15. Ok, I got my fancy menu script and I need to add a card reader to check if the person is on the list. How should I do it? for Dummies?
  16. Thank you so much! Here is what I got but it still refuses to response on "CUSTOM" button // Short version integer gListener; vector RED_COLOR = < 1.000, 0.000, 0.000 > ; // Light color vector lsl RGB vector CUSTOM_COLOR; float INTENSITY = 1.0; float RADIUS = 10.0; float FALLOFF = 0.0; float GLOW = 1.0; integer LIGHT_PRIM = LINK_THIS; //LINK_SET or prim number integer LIGHT_FACE = ALL_SIDES; //light face list MENU_MAIN = ["RED", "OFF", "CUSTOM"]; integer menu_handler; integer menu_channel; integer textbox_handler; integer textbox_channel; menu(key user, string title, list buttons) { llListenRemove(menu_handler); llListenRemove(textbox_handler); menu_channel = 0x80000000 | (integer)("0x" + (string) llGetKey()) * -1; textbox_channel = menu_channel + 100; menu_handler = llListen(menu_channel, "", "", ""); textbox_handler = llListen(textbox_channel, "", "", ""); llDialog(user, title, buttons, menu_channel); llSetTimerEvent(30.0); } default { state_entry() { } 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); llSetTimerEvent(0); if (message == "RED") { llSay(0, "Red Light"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, LIGHT_FACE, GLOW, PRIM_COLOR, LIGHT_FACE, RED_COLOR, 1.0, PRIM_POINT_LIGHT, TRUE, RED_COLOR, INTENSITY, RADIUS, FALLOFF ]); } else if (message == "OFF") { llSay(0, "Light is OFF"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, LIGHT_FACE, FALSE, PRIM_COLOR, LIGHT_FACE, WHITE_COLOR, 1.0, PRIM_POINT_LIGHT, FALSE, ZERO_VECTOR // COLOR , 0.0 // INTENSITY , 0.0 // RADIUS , 2.0 // FALLOFF ]); } } else if (channel == textbox_channel) { llListenRemove(textbox_handler); if (message == "CUSTOM") { vector color; color = (vector) message; llTextBox(llDetectedKey(0), "Input lsl RGB value e.g. <1.0,1.0,1.0>", textbox_handler); if (color != ZERO_VECTOR) { CUSTOM_COLOR = color; llSay(0, "Custom Light"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, LIGHT_FACE, GLOW, PRIM_COLOR, LIGHT_FACE, CUSTOM_COLOR, 1.0, PRIM_POINT_LIGHT, TRUE, CUSTOM_COLOR, INTENSITY, RADIUS, FALLOFF ]); } } } } timer() { llListenRemove(menu_handler); llListenRemove(textbox_handler); llSetTimerEvent(0); } }
  17. Thanks a lot for your responses! I'm not sure if I understood everything correctly, I decided that I needed to add a second listen event, and I get an error "name previously..." about string message. What am I doing wrong? listen(integer channel, string name, key id, string message) { if (message == "CUSTOM") { llListenRemove(gListener); vector color; color = (vector) message; llTextBox(llDetectedKey(0), "Input lsl RGB value e.g. <1.0,1.0,1.0>", menu_handler); if ( color != ZERO_VECTOR) CUSTOM_COLOR = color; llSay(0, "Custom Light"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, LIGHT_FACE, GLOW, PRIM_COLOR, LIGHT_FACE, CUSTOM_COLOR, 1.0, PRIM_POINT_LIGHT, TRUE, CUSTOM_COLOR , INTENSITY , RADIUS , FALLOFF ]); }
  18. Hello! I'm trying to create a lighting script with a light color preset menu and one button for a custom RGB value through a textbox. Therefore, when you click on this button, a text box should appear. but it doesn't work. the problem is I can't figure out where to insert the llTextBox and which channel to use if the menu and the have different channels? Thanks in advance for any help! // Short version just to display what I mean vector RED_COLOR = <1.000, 0.000, 0.000>; // Light color vector lsl RGB vector GREEN_COLOR = <0.000, 1.000, 0.000>; vector WHITE_COLOR = <1.000, 1.000, 1.000>; vector CUSTOM_COLOR; float INTENSITY = 1.0; float RADIUS = 10.0; float FALLOFF = 0.0; float GLOW = 1.0; integer LIGHT_PRIM = LINK_THIS; integer LIGHT_FACE = ALL_SIDES; list MENU_MAIN = ["RED","GREEN","CUSTOM","OFF"]; integer menu_handler; integer menu_channel; menu(key user,string title,list buttons) { llListenRemove(menu_handler); menu_channel = (integer)(llFrand(99999.0) * -1); menu_handler = llListen(menu_channel,"","",""); llDialog(user,title,buttons,menu_channel); llSetTimerEvent(30.0); } default { state_entry() { } 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); llSetTimerEvent(0); if (message == "RED") { llSay(0, "Red Light"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, LIGHT_FACE, GLOW, PRIM_COLOR, LIGHT_FACE, RED_COLOR, 1.0, PRIM_POINT_LIGHT, TRUE, RED_COLOR , INTENSITY , RADIUS , FALLOFF ]); } else if (message == "GREEN") { llSay(0, "Green Light"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, LIGHT_FACE, GLOW, PRIM_COLOR, LIGHT_FACE, GREEN_COLOR, 1.0, PRIM_POINT_LIGHT, TRUE, GREEN_COLOR , INTENSITY , RADIUS , FALLOFF ]); } else if (message == "CUSTOM") <<< { vector color; color = (vector) message; llTextBox(llDetectedKey(0), "Type your RGB below", channel); if ( color != ZERO_VECTOR) CUSTOM_COLOR = color; llSay(0, "Custom Light"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, LIGHT_FACE, GLOW, PRIM_COLOR, LIGHT_FACE, CUSTOM_COLOR, 1.0, PRIM_POINT_LIGHT, TRUE, CUSTOM_COLOR , INTENSITY , RADIUS , FALLOFF ]); } else if (message == "OFF") { llSay(0, "Light is OFF"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, LIGHT_FACE, FALSE, PRIM_COLOR, LIGHT_FACE, WHITE_COLOR, 1.0, PRIM_POINT_LIGHT, FALSE, ZERO_VECTOR // COLOR , 0.0 // INTENSITY , 0.0 // RADIUS , 2.0 // FALLOFF ]); } } } timer() { llListenRemove(menu_handler); llSetTimerEvent(0); } }
  19. I have had this message for half a year. I followed the link and it turned out they need more information for tilia. try it, may help.
×
×
  • Create New...