Jump to content

Oralbuddy

Resident
  • Posts

    9
  • Joined

  • Last visited

Everything posted by Oralbuddy

  1. ok I'm hearing you on the changed event. If im using llGetLinkPrimitiveParams what is the syntax for this test? Hers my change as of yet still producing an error. ParticleStart() { llParticleSystem([ PSYS_PART_FLAGS, 291, PSYS_SRC_PATTERN, 2, PSYS_PART_START_ALPHA, 1.00, PSYS_PART_END_ALPHA, 0.00, PSYS_PART_START_COLOR, <1.00,1.00,1.00>, PSYS_PART_END_COLOR, <1.00,1.00,1.00>, PSYS_PART_START_SCALE, <0.25,0.25,0.00>, PSYS_PART_END_SCALE, <1.00,1.00,0.00>, PSYS_PART_MAX_AGE, 0.80, PSYS_SRC_MAX_AGE, 0.00, PSYS_SRC_ACCEL, <0.00,0.00,2.00>, PSYS_SRC_ANGLE_BEGIN, 0.00, PSYS_SRC_ANGLE_END, 1.05, PSYS_SRC_BURST_PART_COUNT, 5, PSYS_SRC_BURST_RADIUS, 0.10, PSYS_SRC_BURST_RATE, 0.00, PSYS_SRC_BURST_SPEED_MIN, 0.00, PSYS_SRC_BURST_SPEED_MAX, 0.40, PSYS_SRC_OMEGA, <0.00,0.00,0.00>, PSYS_SRC_TEXTURE, "a96ecd50-96e1-28b4-51ec-96b3112210c0" ]); } default { changed(integer change) { if(change & CHANGED_COLOR) { if(llGetLinkPrimitiveParams(LINK_THIS, [PRIM_COLOR,ALL_SIDES]) == <255, 255, 255> 0.0) { ParticleStart(); } else { llParticleSystem([]); } } } }
  2. ok maybe i misunderstood but i thought if i did llGetAlpha in a child prim it would return the avrage alpha float of the entire linkset.
  3. Hello, I am trying to adjust a script so that when the object its in (child prim of a linkset) is in a visible alpha state it activates the particle system in the script. I have found a script that does what I want but uses touch start/stop events instead. So I tried moddiying it to check changed events but i seem to have created a syntax error. any help would be appreciated. //***************************************************************************** // // Simple Touch-based particle script. // // Use: Touching the prim containing this script will turn the particle system // on and off. // //************************************************************* ParticleStart() { llParticleSystem([ PSYS_PART_FLAGS, 291, PSYS_SRC_PATTERN, 2, PSYS_PART_START_ALPHA, 1.00, PSYS_PART_END_ALPHA, 0.00, PSYS_PART_START_COLOR, <1.00,1.00,1.00>, PSYS_PART_END_COLOR, <1.00,1.00,1.00>, PSYS_PART_START_SCALE, <0.25,0.25,0.00>, PSYS_PART_END_SCALE, <1.00,1.00,0.00>, PSYS_PART_MAX_AGE, 0.80, PSYS_SRC_MAX_AGE, 0.00, PSYS_SRC_ACCEL, <0.00,0.00,2.00>, PSYS_SRC_ANGLE_BEGIN, 0.00, PSYS_SRC_ANGLE_END, 1.05, PSYS_SRC_BURST_PART_COUNT, 5, PSYS_SRC_BURST_RADIUS, 0.10, PSYS_SRC_BURST_RATE, 0.00, PSYS_SRC_BURST_SPEED_MIN, 0.00, PSYS_SRC_BURST_SPEED_MAX, 0.40, PSYS_SRC_OMEGA, <0.00,0.00,0.00>, PSYS_SRC_TEXTURE, "a96ecd50-96e1-28b4-51ec-96b3112210c0" ]); } ParticleStop() { llParticleSystem([]); } //***************************************************************************** // // Default state: LSL will always start in this state. // // Immediately go to the 'Off' state. // //***************************************************************************** default { changed(integer change) {float alpha = llGetLinkPrimitiveParams(LINK_THIS, [PRIM_COLOR,ALL_SIDES]);} {if (float alpha = [0.0]) {ParticleStart();} else {ParticleStop();} } } { state_entry() { state Off; } } //***************************************************************************** // // On state: Starts the particle system when this state is entered. // // Transitions to the 'Off' state when this prim is touched. // //***************************************************************************** state On { state_entry() { ParticleStart(); } touch_start(integer total_number) { state Off; } } //***************************************************************************** // // Off state: Stops the particle system when this state is entered. // // Transitions to the 'On' state when this prim is touched. // //***************************************************************************** state Off { state_entry() { ParticleStop(); } touch_start(integer total_number) { state On; } }
  4. Thank you everyone this has been extreamly helpful and very enlightening. I am happy to report that thanks to the help I got I was able to get the script together and setup and fix the start event so its all working perfectly. you guys are amazing and worthy of extreamly high praise. please keep doing what your doing becasue without resources like this people like me would give up on what was otherwise a very rewarding process.
  5. Ok I think I see why this is a better way to go I just need to fix the touch part but this has helped immensely thank you so much. Is there way for the size change of child prim #17 to trigger the event?
  6. Ok thank you for the help Like I said I've only modified scripts before not made my own so I still have a lot of confusion. what if I changed the "else if"'s to there own "if" conditionals so it looks more like: vector Object1 = llGetLinkPrimitiveParams(17, [PRIM_SIZE]); default { if (Object1 < <0.012500, 0.012500, 0.0660>) { llSetLinkAlpha(20, 1.0, ALL_SIDES) } if (Object1 >= <0.012500, 0.012500, 0.0660>) { llSetLinkAlpha(20, 0.0, ALL_SIDES) } if (Object1 < <0.012500, 0.012500, 0.1220>) { llSetLinkAlpha(21, 1.0, ALL_SIDES) } if (Object1>= <0.012500, 0.012500, 0.1220>) { llSetLinkAlpha(21, 0.0, ALL_SIDES) } if (Object1 < <0.012500, 0.012500, 0.1780>) { llSetLinkAlpha(22, 1.0, ALL_SIDES) { if (Object1 >= <0.012500, 0.012500, 0.1780>) { llSetLinkAlpha(22, 0.0, ALL_SIDES) } if (Object1 < <0.012500, 0.012500, 0.2340>) { llSetLinkAlpha(23, 1.0, ALL_SIDES) } if (Object1 >= <0.012500, 0.012500, 0.2340>) { llSetLinkAlpha(23, 0.0, ALL_SIDES) } if (Object1 < <0.012500, 0.012500, 0.2800>) { llSetLinkAlpha(24, 1.0, ALL_SIDES) } if (Object1 >= <0.012500, 0.012500, 0.2800>) { llSetLinkAlpha(24, 0.0, ALL_SIDES) } }
  7. Hi I am trying to script an object I created to make some parts of its linkset opaque when another prim in the linkset changes size. This is my first project with code entirely from scratch so please be gentle I'm sure its a mess lol. if possible I would like to call the primit watches for change by name rather than link number to allow for further build changes. Ok heres what I came up with: default { changed(integer change) list Object1 = llGetLinkPrimitiveParams(17, [PRIM_SIZE]); { if (change & CHANGED_SCALE) { if (Object1 < "<0.012500, 0.012500, 0.0660>") llSetLinkPrimitiveParamsFast(20,[PRIM_COLOR, all, <0, 0, 0>, 0.00]; else if (Object1 >= "<0.012500, 0.012500, 0.0660>") llSetLinkPrimitiveParamsFast(20,[PRIM_COLOR, all, <0, 0, 0>, 1.00]); else if (Object1 < "<0.012500, 0.012500, 0.1220>") llSetLinkPrimitiveParamsFast(21,[PRIM_COLOR, all, <0, 0, 0>, 1.00]; else if (Object1 >= "<0.012500, 0.012500, 0.1220>") llSetLinkPrimitiveParamsFast(21,[PRIM_COLOR, all, <0, 0, 0>, 0.00]; else if (Object1 < "<0.012500, 0.012500, 0.1780>") llSetLinkPrimitiveParamsFast(22,[PRIM_COLOR, all, <0, 0, 0>, 1.00]; else if (Object1 >="<0.012500, 0.012500, 0.1780>") llSetLinkPrimitiveParamsFast(22,[PRIM_COLOR, all, <0, 0, 0>, 0.00]; else if (Object1 >= <0.012500, 0.012500, 0.2340>) llSetLinkPrimitiveParamsFast(23,[PRIM_COLOR, all, <0, 0, 0>, 0.00]; else if (Object1 < <0.012500, 0.012500, 0.2340>) llSetLinkPrimitiveParamsFast(23,[PRIM_COLOR, all, <0, 0, 0>, 1.00]; else if (Object1 >= <0.012500, 0.012500, 0.2800>) llSetLinkPrimitiveParamsFast(24,[PRIM_COLOR, all, <0, 0, 0>, 0.00]; else if (Object1 < <0.012500, 0.012500, 0.2800>) llSetLinkPrimitiveParamsFast(24,[PRIM_COLOR, all, <0, 0, 0>, 1.00]; } } }
×
×
  • Create New...