|
Doba Steele
Registered User
Join date: 24 Dec 2004
Posts: 3
|
08-01-2006 09:45
Hi all, got problem/question.
How i can become the info how many objects are in a object if i link two? Okay, i know this command: (string)llGetInventoryNumber(INVENTORY_ALL); Its work but only show me the content of the prim in there are this script. But what i must do that the show me the content of the other objects if it link ? (without script in the other prim...)
(Hmpf, sorry for my english.... i hope you understand me..)
|
|
Damanios Thetan
looking in
Join date: 6 Mar 2004
Posts: 992
|
08-01-2006 10:15
You'll have to use one central script receiving and collecting the content info from the other prims using linked messages. And a client script in each prim collecting the content and sending it out as a linked message. Pseudocode: client: list contentList; for(t =0; t < llGetInventoryNumber(..); t++) { contentList+=[llGetInventoryName(..,t)]; } string contentMsg = llList2CSV(contentList); llMessageLinked(LINK_ROOT,.. contentMsg, .);
---------------------- central script: global list allContent;
link_message event (..,msg,..) { list primContent = llCSV2List(msg) allContent+= primContent; }
Ofcourse, if you need to know which item is in which prim, you also need to store this info in the central script, either in a separate list or use a strided list. Oh, if you just need the number. Use the same thing, but just send the llGetInventoryNumber as the num param in the linked message, and add them up in the central script 
|
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
Slight Confusion
08-01-2006 10:17
Are you trying to get a report on the contents of the inventory of every prim in a linkset? If so, then you need to execute that code snippet in a script inside every prim in the linkset. There is currently no other way to get the inventory content of a prim via script. On the other hand, if *you* want the information, and do not need to pass it to a script, try editing the object, enabling Edit Selected Parts [checkbox at botom left of small version of edit window], and left-clicking on each prim with the edit window`s Contents tab open. Toodle-oo!
|
|
Salindria Thunders
Registered User
Join date: 11 Jun 2006
Posts: 29
|
08-02-2006 10:55
If your wanting toknow the entire prim count of linked objects and not the contents, just right click and select the edit in the pie menu and go to the general tab it will say
1 object (the entire linked object) xx prims (the amount of prims taken to make the object)
If you have prim objects inside the linked object you will then need scripts to help on that.
|