Jump to content

Multiple attaching


Highstaker
 Share

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

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

Recommended Posts

Couple of questions.

1) Is it possible to attach a particular script to several objects at once (so i wouldn't have to select each object separately and drop a script into it)? Linking them is not an option, they are already quite "heavy".

 

2) If i have a linked object, when i attach a script, it is actually attached to a root prim. So when i unlink them (for example by llBreakAllLinks), only a root prim continues to use this script. But I want it to be used by former child prims as well.

Can I somehow attach this script to ALL prims in this object (of course, without selecting every prim separately and attaching a script to it)?

 

Thanks.

Link to comment
Share on other sites

Scripts aren`t attached to prims they are put into their contents, so yes you would have to drop or create a script into each prim that you want it in, because if you select multiple unlinked prims at the same time, there are no "contents" available to you to edit.

You are correct that if you script a linked object, the script is only in the root prim, unless you edit linked parts & script each child prim too, though with a linkset it is possible to script an action to all prims in the linkset with just a script in one prim.

You can create a prim with the script in it and then copy that prim to use to make the other prims, so that they all end up scripted without the need to go back and script them individually.

Maybe if you explain a bit more about about what you are trying to achieve & what sort of script you are talking about, someone can offer an easier way of doing it.

Link to comment
Share on other sites

To add to what PeeWee already said:

The basic rule is: You can only edit one inventory at a time. If copying a prim that already has the script you want to have in several prims is not an option, you will have to do it manually, I'm afraid.

You can copy scripts to inventories using llGiveInventory, but that sets them to 'not running'. If you want to copy a script and run it, you could use LlRemoteLoadScriptPin together with llSetRemoteScriptAccessPin - but the latter would have to be in the target prim - which will most likely back to 1st base

Link to comment
Share on other sites

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

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
 Share

×
×
  • Create New...