Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
07-11-2005 19:00
I've been delving through the WIKI looking from some sort of command function like:
llGetPrim(x);...where (x) would be the link number of the prim...and the function would simply select the prim of link number (x).
I can't find such a function. Does anyone know of such a function? Or a work around to get the same type of thing?
(script is counting total number of prims in an object, then acting upon certain prims of numbers x, y, z)
|
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
|
07-11-2005 19:10
I'm not totally sure what you mean by "select", but I think you probably want llGetLinkName. There may be another link function that does what you want, though. See the LSL wiki's " link" page for a complete list.
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
07-11-2005 19:12
There's llGetLinkNumber() - you could have each child report itself to the parent, and the parent script would select the highest number, thus the number of prims in the object. llGetLinkName() is also a possibility (Run through the numbers until you get a NULL_KEY).
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
07-11-2005 19:57
From: Kenn Nilsson (script is counting total number of prims in an object, then acting upon certain prims of numbers x, y, z)
Try looking here. You will find llGetNumberOfPrims handy for counting. As for your other problem, Im not sure what exactly you're doing when you say "acting upon prims", so I cant be of much help. ==Chris
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
07-11-2005 20:52
Thanks for the help.
Yea, I've already got the llGetNumberOfPrims thing goin'...
That's where the problem lies...take, for example...the following script format:
integer x = 0; integer prims = llGetNumberOfPrims();
WHILE (x < = prims) { x = x +1; _currentPrim = --FunctionCallI'mMissing--(x); (Do stuff to the _currentPrim) }
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
07-11-2005 21:28
Can not do that, save for things like llSetLinkAlpha() and llSetLinkColor(). What you'll probably want to do is put a control script in each child prim, and order it to do it's thing with llMessageLinked().
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
07-12-2005 09:27
Thanks Jillian. Too bad it's not possible to do that, but there's always a work around. Appreciate it.
|