Mila Edelman Posted April 19, 2011 Share Posted April 19, 2011 I'm a programmer in Life #1, so LSL is just another language to me. However, I am apparently not using the correct phrasing to look for the particular function to accomplish what I want. I figure SOMEONE here has to know.Say I have a root prim. It's got Photo-A and Photo-B as inventory items, plus a script. What I need the script to do is put copies of Photo-A and Photo-B into each child prim's inventory.I have several business-related scripts that do this, but they're all no-mod, so I can't pick them apart to find the snippet/function I want, and utilize it the way I'd like. These particular final scripts don't do anything related to what I'm currently writing for myself (as many of you know, I often write tools to automate things I don't feel like doing), else I'd just use them. I just need to know what that particular function (or set of functions) is.Can someone point me in the correct direction? On LSLWiki.net, or? Link to comment Share on other sites More sharing options...
Void Singer Posted April 19, 2011 Share Posted April 19, 2011 llGetLinkKey and llGiveInventory are what you want. make sure to use an actual prim link number for get link key, as the link flags don't play nice with it. Link to comment Share on other sites More sharing options...
Talarus Luan Posted April 19, 2011 Share Posted April 19, 2011 You'll have to use the aforementioned functions in a loop. Something like: for (linknum=2; linknum <= llGetNumberOfPrims(); ++linknum) { llGiveInventory(llGetLinkKey(linknum),"PhotoA"); llGiveInventory(llGetLinkKey(linknum),"PhotoB"); } Link to comment Share on other sites More sharing options...
Mila Edelman Posted April 19, 2011 Author Share Posted April 19, 2011 Thank you both! It worked. The tool I'm writing will likely save me over four hours in the product launch process. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.