Jump to content

easy way to apply a script to the whole linkset?


You are about to reply to a thread that has been inactive for 1136 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

you know.. instead of having to do it to each object in the link set once by one? i have lots of trees set out with custom leaf "prim" i grabbed from a different tree .. now im animating them and .. should noted that the leaves of my trees are all their own linkset separate from the trunk and branches .. is there a quick way to apply my new texture animation to all the object in the leafs linkset or do i really have to do it one object at a time for the 50+ trees on my sim XD..

ps if you can't be helpful, try being quiet ;)

  • Confused 2
Link to post
Share on other sites
12 minutes ago, tabletopfreak Toocool said:

ps if you can't be helpful, try being quiet ;)

1. That's rude if you're really expecting help, that would deter people from wanting to help.

13 minutes ago, tabletopfreak Toocool said:

is there a quick way to apply my new texture animation to all the object in the leafs linkset 

2. Yes, you could name the leaf prims as "Leaf" or something link that, so the script can tell them apart from the other prims. Then you would run a loop through the prims, checking the name, and if it matches what you're looking for, use llSetLinkTextureAnim(LINK_NUMBER.... then your animation parameters

  • Like 2
  • Confused 1
Link to post
Share on other sites
3 minutes ago, Ruthven Willenov said:

1. That's rude if you're really expecting help, that would deter people from wanting to help.

I already refrain from helping that user... previous threads show how he gets angry at advice he does not understand... (kinda deja vu moment here)

  • Like 1
  • Haha 1
  • Confused 1
Link to post
Share on other sites
animate()
{
    integer num = llGetNumberOfPrims();
    if(num > 1)//if it's a single prim object, the link number would be 0, so the following loop wouldn't work
    {
        while(num)
        {
            string name = llGetLinkName(num);
            if(name == "leaf")//change to whatever it is you named your leaf prims, case sensitive.
            {
                llSetLinkTextureAnim(num,ROTATE,2, 0, 1,1,1,0.005);//parameters I got from your other thread
            }
            --num;
        }
    }

use the above snippet to animate your leaves, based on what you name your leaf prims, and the parameters are from your other thread

Link to post
Share on other sites

Hi, again. B|   Ruthven has shown you the way to handle one tree.  The way to handle 50+ trees (assuming that they are identical) is to script one tree and copy it 50+ times.  That's a lot more efficient than loading scripts into 50+ trees.

There's no way to script 50+ trees at once.  With a little bit of planning, though, you could change the leaf texture on every single tree with one command.  You would need to write your basic tree script to listen for a command from a master script that sends it the UUID of a new texture and then substitutes the new one for whatever was there before.  It would mean thinking through the logic carefully, but wouldn't actually be all that hard.  Once you had all the trees scripted, then you could change the entire forest from spring leaves to summer ones or moth-eaten ones or fanciful fairyland ones with the touch of a button on your master scripted object.  Might be kind of fun.

  • Thanks 1
Link to post
Share on other sites

i use a script distributor,   i made mine, but you can get one free on MP?

https://marketplace.secondlife.com/p/100Distributor-Distribute-delete-scripts-or-others-in-multiprims-objects-FREE-FREE/940227

::snippet::

key owner;
string slaveScript = "LinkBurn 2.6.2" ;
SEND()
{      
   toGo += slaveScript;
   integer prims = llGetObjectPrimCount( llGetKey() );
   llRegionSayTo( owner,0,"\n \nSlave scripts being sent, please wait ...." + (string) ((prims - 1) * 3) + "  seconds.\n" );
   integer x;
   for(x = 2 ; x <= prims ; ++x)
   {   llGiveInventoryList( llGetLinkKey(x), "", toGo); 
   }
    llRegionSayTo( owner,0,"\n \n*** Slave script sent to " + (string) (prims - 1) + " prims \n
     \n*** Removing Slave script from MAIN \n" +
    "\nPlease take linkset into inventory, re-rez, EDIT your linkset, 
    then click the BUILD tab and choose Scripts > set scripts to running,
    then click this root prim ..." );
    llRemoveInventory( slaveScript );  
}      

 

Edited by Xiija
  • Like 3
Link to post
Share on other sites
4 hours ago, Xiija said:

i use a script distributor,   i made mine, but you can get one free on MP?

https://marketplace.secondlife.com/p/100Distributor-Distribute-delete-scripts-or-others-in-multiprims-objects-FREE-FREE/940227

::snippet::


key owner;
string slaveScript = "LinkBurn 2.6.2" ;
SEND()
{      
   toGo += slaveScript;
   integer prims = llGetObjectPrimCount( llGetKey() );
   llRegionSayTo( owner,0,"\n \nSlave scripts being sent, please wait ...." + (string) ((prims - 1) * 3) + "  seconds.\n" );
   integer x;
   for(x = 2 ; x <= prims ; ++x)
   {   llGiveInventoryList( llGetLinkKey(x), "", toGo); 
   }
    llRegionSayTo( owner,0,"\n \n*** Slave script sent to " + (string) (prims - 1) + " prims \n
     \n*** Removing Slave script from MAIN \n" +
    "\nPlease take linkset into inventory, re-rez, EDIT your linkset, 
    then click the BUILD tab and choose Scripts > set scripts to running,
    then click this root prim ..." );
    llRemoveInventory( slaveScript );  
}      

 

almost what i needed.. the only issue is you have to pick up and rerezz the item.. so i mean maybe i will use it.. guess converting all my trees to have animated leaves is gonna be a project no matter how i slice it, thanks tho and this cought make it faster long as i dont mess up and loose track of what im returning to last position 

Link to post
Share on other sites
6 hours ago, Rolig Loon said:

Hi, again. B|   Ruthven has shown you the way to handle one tree.  The way to handle 50+ trees (assuming that they are identical) is to script one tree and copy it 50+ times.  That's a lot more efficient than loading scripts into 50+ trees.

There's no way to script 50+ trees at once.  With a little bit of planning, though, you could change the leaf texture on every single tree with one command.  You would need to write your basic tree script to listen for a command from a master script that sends it the UUID of a new texture and then substitutes the new one for whatever was there before.  It would mean thinking through the logic carefully, but wouldn't actually be all that hard.  Once you had all the trees scripted, then you could change the entire forest from spring leaves to summer ones or moth-eaten ones or fanciful fairyland ones with the touch of a button on your master scripted object.  Might be kind of fun.

thanks for trying to help, but what im looking for is an easy way to script 50 trees like like boom boom boom, the trees are out and i dont want to pick them up and re drop them as they are all perfectly places around homes and buildings , some are off sim ect.. but yes best way would have been to animate them 1st before placing out.. the only reason im doing it now is i found an animated tree that scripts were mod so i have tuned it to work with my other trees .. ill do the work.. just posted this to make sure there wants anything i could do to make dragging in the script just work on the whole linkset at once .. thanks again

Link to post
Share on other sites
7 hours ago, Fionalein said:

I already refrain from helping that user... previous threads show how he gets angry at advice he does not understand... (kinda deja vu moment here)

your "advice" was "you should just get it" and here you are again why?? just love to hear yourself type??? not sure what your goal was last time or this time you offer nothing to the treads iv posted other then smugness 

Link to post
Share on other sites
7 hours ago, Ruthven Willenov said:

animate()
{
    integer num = llGetNumberOfPrims();
    if(num > 1)//if it's a single prim object, the link number would be 0, so the following loop wouldn't work
    {
        while(num)
        {
            string name = llGetLinkName(num);
            if(name == "leaf")//change to whatever it is you named your leaf prims, case sensitive.
            {
                llSetLinkTextureAnim(num,ROTATE,2, 0, 1,1,1,0.005);//parameters I got from your other thread
            }
            --num;
        }
    }

use the above snippet to animate your leaves, based on what you name your leaf prims, and the parameters are from your other thread

hi, tired this, i changed only the word leaf to match the name of the leaf prims but i get an error "(14, 4) : ERROR : Syntax error

Link to post
Share on other sites
7 hours ago, Ruthven Willenov said:

1. That's rude if you're really expecting help, that would deter people from wanting to help.

2. Yes, you could name the leaf prims as "Leaf" or something link that, so the script can tell them apart from the other prims. Then you would run a loop through the prims, checking the name, and if it matches what you're looking for, use llSetLinkTextureAnim(LINK_NUMBER.... then your animation parameters

its rude to ask people who have no help to offer, to not reply?? if you have nothing to add to help solve the question .. i ask for you to not post back in my thread.. im rude for asking others to not be rude O.o???

you have offered help.. so why muddy that by calling me rude??

i had a simple question in my other thread and cat face had nothing to offer but "its rather self explaining" thats rude..  and is CERTAINLY isn't advise 

Link to post
Share on other sites
3 minutes ago, tabletopfreak Toocool said:

i had a simple question in my other thread and cat face had nothing to offer but "its rather self explaining" thats rude..  and is CERTAINLY isn't advise 

Did you ever hear about good programming practice? As in self explaining variable names? Because I pointed out to you that it is exactley that... It's not my fault you want to touch a subject you don't understand.

  • Haha 1
Link to post
Share on other sites
Just now, Fionalein said:

Did you ever hear about good programming practice? As in self explaining variable names? Because I pointed out to you that it is exactley that... It's not my fault you want to touch a subject you don't understand.

how ever, it is your fault to committed with nothing useful tho

  • Haha 1
Link to post
Share on other sites
24 minutes ago, tabletopfreak Toocool said:

almost what i needed.. the only issue is you have to pick up and rerezz the item.. 

That's the instructions, but I think you'll find that merely recompiling the scripts will get them to start (while selected, Build/Scripts/Recompile Scripts (Mono) -- this should work with a batch of them selected at the same time).

If this is a thing you'll do repeatedly (so the scripts can remove themselves between seasonal changes, say) you could first distribute a one-time script that calls llSetRemoteScriptAccessPin to prepare all the objects as subsequent targets for llRemoteLoadScriptPin so they can be updated with new already running scripts.

Link to post
Share on other sites
9 minutes ago, tabletopfreak Toocool said:

how ever, it is your fault to committed with nothing useful tho

Right now I consider convincing people not wasting their time in trying to help you useful... ;) 

PS: At least until you change your attitude

Edited by Fionalein
  • Haha 1
Link to post
Share on other sites
1 minute ago, Qie Niangao said:

That's the instructions, but I think you'll find that merely recompiling the scripts will get them to start (while selected, Build/Scripts/Recompile Scripts (Mono) -- this should work with a batch of them selected at the same time).

If this is a thing you'll do repeatedly (so the scripts can remove themselves between seasonal changes, say) you could first distribute a one-time script that calls llSetRemoteScriptAccessPin to prepare all the objects as subsequent targets for llRemoteLoadScriptPin so they can be updated with new already running scripts.

i tried resetting scripts and tried  the run scripts option in the pie menu but the only way they kicked in was after a re rezz, nah, its not for season changes , just trying to make the textures sway a bit, got that working great now, just trying to do it to the trees i have out the quickest way possible 

Link to post
Share on other sites
2 minutes ago, Fionalein said:

Right now I consider convincing people not wasting their time in trying to help you useful... ;) 

but my leafs are animated.. sooo.. i guess.... maybe its ok im trying something outside of my wheelhouse??? and now people are trying to help me convert my other trees quickly with my new script ... sooo.. eer.. try harder ?? (cuzz its not working :)

Link to post
Share on other sites
28 minutes ago, tabletopfreak Toocool said:

i tried resetting scripts and tried  the run scripts option in the pie menu but the only way they kicked in was after a re rezz, nah, its not for season changes , just trying to make the textures sway a bit, got that working great now, just trying to do it to the trees i have out the quickest way possible 

Yeah, resetting definitely won't work. Try recompiling -- that worked for me anyway.

Link to post
Share on other sites
4 hours ago, tabletopfreak Toocool said:

its rude to ask people who have no help to offer, to not reply?? if you have nothing to add to help solve the question .. i ask for you to not post back in my thread.. im rude for asking others to not be rude O.o???

you have offered help.. so why muddy that by calling me rude??

i had a simple question in my other thread and cat face had nothing to offer but "its rather self explaining" thats rude..  and is CERTAINLY isn't advise 

I said it was rude because of the way it was worded, and if anyone, like some of the people on this thread, read your previous thread, it would be easy to see why it came off as rude.

 

 

Link to post
Share on other sites
11 hours ago, Xiija said:

i use a script distributor,   i made mine, but you can get one free on MP?

If you plan ahead, you can use llRemoteLoadScriptPin, which allows you to give running scripts to objects and links.   Then you don't need to mess around with taking, re-rezzing and setting scripts to running.

However, that of course means you need to plan in advance and use http://wiki.secondlife.com/wiki/LlSetRemoteScriptAccessPin to set up the target prims beforehand.

 

 

Link to post
Share on other sites
7 hours ago, tabletopfreak Toocool said:

hi, tired this, i changed only the word leaf to match the name of the leaf prims but i get an error "(14, 4) : ERROR : Syntax error

Ah ... The syntax error may be the fact that there's a curly bracket } missing at the end, or that you were trying to use the snippet as a standalone script, which it isn't.  You need to build Ruthven's function into your own script.  It seems that's not really the main problem you're facing, though. A function like this will deal with all the prims in a linkset, but your 50+ trees are not all in a linkset.  They are separate trees.  I have lost track of the number of times I have deleted and replaced a large number of objects that needed better textures or other improved features.  It's boring work, but it goes a lot faster than you think it will.  Things usually look better the second time around, too.

Link to post
Share on other sites
4 hours ago, Rolig Loon said:

Ah ... The syntax error may be the fact that there's a curly bracket } missing at the end, or that you were trying to use the snippet as a standalone script, which it isn't.  You need to build Ruthven's function into your own script.  It seems that's not really the main problem you're facing, though. A function like this will deal with all the prims in a linkset, but your 50+ trees are not all in a linkset.  They are separate trees.  I have lost track of the number of times I have deleted and replaced a large number of objects that needed better textures or other improved features.  It's boring work, but it goes a lot faster than you think it will.  Things usually look better the second time around, too.

yeah each tree top has like 5-8 objects .. i can handle doing them one by one (each linkset) i can even handle doing each piece one by one but i figured i ask and see if there was a better way to do it.. imma look up what recompiling a script means like Qie Niangao  said to do

Link to post
Share on other sites
7 hours ago, Ruthven Willenov said:

I said it was rude because of the way it was worded, and if anyone, like some of the people on this thread, read your previous thread, it would be easy to see why it came off as rude.

 

 

that?? the other thread is all good.. nothing negative other than cat face attempting to put me down for not understanding instantly that sizey means size Y... your ridiculous man.. again you offered help.. but also bs.. this thread is, and always as been about finding an easy quick way to get one script into many objects of a linkset (something lots of people would like to know, no doubt).. i mean asking people with nothing to offer to be quite it rude?? (that part wouldn't even be there if cat face wouldn't of jumped into the other thread for literally no reason other than to look down on others)i thought being quiet unless you have something to say was just a rule of thumb .. but something about being behind a screen miles away on these forums makes people feel like real smart asses ..it's not just sl seems to be any forum that deals with a game..maybe its a gamer problem .. could be since we play games cuzz we have free time?? some of us have so much free time we roam the forum and make useless comments that don't further the discussion??.. speaking of useless comments,, xD here i go making one cuzz if anything was self explaining in that other thread , it was how caty, cat face was trying to be .. so clearly trying to explain it to you is a waste of my time.. the pointless commitying is contagious xD

Link to post
Share on other sites

Sorry Mr "Too cool to be not offended" (you obviously don't even have the manner to use names, so why should I) I only stated what it meant. You interpret it as "She called me stupid" ... how do you even get around RL if you cannot take a simple advice for anything else but an offence? You also called SL a sinking boat in your response, if you experience it as sinking boat I have a suggestion for you: Please, for heaven's sake, just leave then! We really don't need more poisonous people here.

Edited by Fionalein
Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 1136 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...