Jump to content

MaxNobaru

Resident
  • Posts

    5
  • Joined

  • Last visited

Everything posted by MaxNobaru

  1. Hey gys, i was looking for a similar one, but when on AIR it glows, and when on gorund it hides i made up something to hide, but couldnt figure out how to glow at all, could you guys help? its like this key owner; default { on_rez(integer start_param) { llResetScript(); } changed(integer change) { if (change & (CHANGED_OWNER | CHANGED_INVENTORY)) llResetScript(); } state_entry() { owner = llGetOwner(); llSetTimerEvent(1.0); } timer() { integer ownerInfo = llGetAgentInfo(owner); if(ownerInfo & AGENT_IN_AIR) llSetAlpha((float)TRUE, ALL_SIDES); else llSetAlpha((float)FALSE, ALL_SIDES); } }
  2. Yes, as you said, it goes on a hud, and the listener is on the item as for the key parameter its marked as 'id' too on the listen () integer CMD_CH = -1024; default { state_entry() { llListen(CMD_CH, "", "", ""); } listen(integer ch, string name, key id, string msg) { llSetColor((vector)msg, ALL_SIDES); } } when i tried the getowner i noticed the two touch parameters here, but as it worked just fine i didnt chenge there just put } before the second one to close and for the listener being the same didnt think the problem could be there
  3. hey man sorry to bother again, but this one i really dont know how to do as it wasnt mine its the other script im using for the change color here, wat im trying is to make it owner only to use, as it is now anyone can change, and it changes everything that have the script, anyone who i send it can change for everyone and its just a mess, if you could save this soul again pls integer HS_PLANE_FACE = 2; integer L_AXIS_FACE = 4; integer CMD_CH = -1024; vector HSL = <0.0, 0.0, 0.5>; //Set new color and (optionally) preview new_hsl_color(vector color) { //llSetColor(hsl_2_rgb(<color.x, color.y, 0.5>), L_AXIS_FACE); llSay(CMD_CH, (string)hsl_2_rgb(color)); llSleep(0.1); } //Wrap value to between 0 and 1 float scale_f(float f) { if (f < 0.0) { f += 1.0; } else if(f > 1.0) { f -= 1.0; } return f; } //Calculate RGB from (t, p, q) float rgb_color(float c, float p, float q) { if(c < 0.166667) { return p+(q-p)*6*c; } else if(c >= 0.166667 && c < 0.5) { return q; } else if(c >= 0.5 && c < 0.666667) { return p+(q-p)*6*(0.666667 - c); } else { return p; } } //Convert HSL color to RGB color vector hsl_2_rgb(vector color) { float p; float q; vector t = <scale_f(color.x + 0.333333), scale_f(color.x), scale_f(color.x - 0.333333)>; if (HSL.z < 0.5) { q = color.z * (1 + color.y); } else { q = color.z + color.y - (color.z * color.y); } p = 2*color.z - q; return <rgb_color(t.x, p, q), rgb_color(t.y, p, q), rgb_color(t.z, p, q)>; } default { state_entry() { //Initial color //new_hsl_color(HSL); } touch_start(integer n) { integer face = llDetectedTouchFace(0); if(face == HS_PLANE_FACE) { //HS plane vector v = llDetectedTouchST(0); HSL = <v.y, 1.0 - v.x, HSL.z>; new_hsl_color(HSL); } else if(face == L_AXIS_FACE) { //L axis vector v = llDetectedTouchST(0); HSL = <HSL.x, HSL.y, v.y>; new_hsl_color(HSL); } else if(face == -1) { //TOUCH_INVALID_FACE ~ outdated viewer llInstantMessage(llDetectedKey(0), "Please update your viewer to use this color picker :P"); } } touch(integer n) { integer face = llDetectedTouchFace(0); if(face == HS_PLANE_FACE) { //HS plane vector v = llDetectedTouchST(0); HSL = <v.y, 1.0 - v.x, HSL.z>; new_hsl_color(HSL); } else if(face == L_AXIS_FACE) { //L axis vector v = llDetectedTouchST(0); HSL = <HSL.x, HSL.y, v.x>; new_hsl_color(HSL); } } } ive read in another place to put (llDetectedKey(0) == llGetOwner()) after 'start touch' but it didnt seem to work
  4. Thank you so much, i see it now, was afraid to change it to much and ending up not working Also didnt think this could work this way, tunnel vision can make you bug out sometimes Its wroking alright now ♥
  5. hey man could you share how you did? im stuck on something similar, not really good with scripts, so im struggilng here i need it to change the particle collor, and it does change when i save, but if a change the prim collor it stays the other collor default { state_entry() { llParticleSystem( [ PSYS_SRC_PATTERN,PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY, PSYS_SRC_BURST_RADIUS,0, PSYS_SRC_ANGLE_BEGIN,0, PSYS_SRC_ANGLE_END,0, PSYS_SRC_TARGET_KEY,llGetKey(), PSYS_PART_START_COLOR,llGetColor(1), // Input Start LSL Color Here PSYS_PART_END_COLOR,llGetColor(1), // Input End LSL Color Here PSYS_PART_START_ALPHA,1, PSYS_PART_END_ALPHA,0, PSYS_PART_START_GLOW,0.05, PSYS_PART_END_GLOW,0.02, PSYS_PART_BLEND_FUNC_SOURCE,PSYS_PART_BF_SOURCE_ALPHA, PSYS_PART_BLEND_FUNC_DEST,PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA, PSYS_PART_START_SCALE,<0.200000,0.200000,0.000000>, PSYS_PART_END_SCALE,<1.00000,1.00000,0.000000>, // Adjust Scale here PSYS_SRC_TEXTURE,"UUID", PSYS_SRC_MAX_AGE,0, PSYS_PART_MAX_AGE,10, PSYS_SRC_BURST_RATE,10, // Adjust rate here PSYS_SRC_BURST_PART_COUNT,2, PSYS_SRC_ACCEL,<0.000000,0.000000,0.000000>, PSYS_SRC_OMEGA,<0.000000,0.000000,0.000000>, PSYS_SRC_BURST_SPEED_MIN,0.1, PSYS_SRC_BURST_SPEED_MAX,0.1, PSYS_PART_FLAGS, 0 | PSYS_PART_EMISSIVE_MASK | PSYS_PART_FOLLOW_SRC_MASK | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK ]); } } Dont know if its missing something, cant make it change the collor this way
×
×
  • Create New...