Pamela Galli Posted December 12, 2015 Share Posted December 12, 2015 I have a mesh centerpiece with particle candle flames. The location of the flames are controlled with a script, according to link # - but a fourth shows up in a mesh tassel where a flame does not belong. I put a scrubber in the tassel and that seemed to work until re-rez or copy, then the errant flame appears. I unlinked the tassel and put a scrubber in, the flame disappears -- but reappears when I relink it.Is there any way to get this prim to stop thinking it is supposed to produce a flame? Link to comment Share on other sites More sharing options...
arton Rotaru Posted December 12, 2015 Share Posted December 12, 2015 Sounds like a script issue.. Usually I get link numbers by name in a loop function. It's independent of linking/unlinking this way. It will turn on/off any prim called "flame" in the linkset. The downside is, it will loop through the entire linkset each time. integer giT;LinkNum(string _name, integer _on){ integer iP = llGetNumberOfPrims(); while(iP) { if (llGetLinkName(iP) == _name) { if (_on) { FlameParticles(iP); } else { llLinkParticleSystem(iP, []); } } iP--; }}default{ touch_start(integer total_number) { LinkNum("flame", giT = !giT); }} Link to comment Share on other sites More sharing options...
Pamela Galli Posted December 12, 2015 Author Share Posted December 12, 2015 Thank you Arton -- I could not get it to work. It kept giving me an error saying something about name not defined, in line 11. I tried putting in the name of the particle texture. I put the script in the root, not the affected prim. Also all the mesh on this thing keeps going invisible, I think it just may be borked in the database. Link to comment Share on other sites More sharing options...
arton Rotaru Posted December 12, 2015 Share Posted December 12, 2015 Yeah, this is just an example script. The whole particle fuss and some access control and so on is missing there. If you would send me your particle code, I can put something functional together, if you like. Link to comment Share on other sites More sharing options...
Rolig Loon Posted December 12, 2015 Share Posted December 12, 2015 If particles are only generated in the candles, then you can safely turn off the ones in your tassel with a variation on Arton's theme. default{ state_entry() { integer i = llGetNumberOfPrims(); while (i) { if (llGetLinkName(i) != "candle") // Or whatever your candle links are named ... { llLinkParticleSystem( i, []); } --i; } }} That is .... Look at every blessed link in the linkset. If it's name is "candle", ignore it. If not, turn off any particles you find. Link to comment Share on other sites More sharing options...
Pamela Galli Posted December 14, 2015 Author Share Posted December 14, 2015 Thanks Rolig! Will let you know how it turns out :-) Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now