Edmond Poole
Junior Member
Join date: 3 Aug 2004
Posts: 6
|
08-06-2004 03:54
hi all
here is the deal i want to create a "house in a box," (i.e. you click on the box and poof a house pops out).
Mainly what i need to do is get all my prims to communicate
I need all of the prims to communicate because mainly i want to be able to, while i am designing my "house in a box," delete all the prims but the main one in preperation for the next run of the script. The only way i have found to acomplish this is to use llDie() (aside from edit, click, delete, click, delete, click, delete...), and seeing as how ther is no llDie(key k), i have to be able to communicate with the "child" prims to tell them when to fire llDie().
i started out using llListen() and the listen event, and "too many listen events running error" occured, so i tried to use llListenControl(), but inorder for me to llListControl() the child listen event from within the parent i somehow have to send the hangle for the listener back to the parent, and frankly creating some elaberate say/listen thingy just to tell a prim i want it to die seems a little silly.
Which brings me to llCreateLink() and my question. ***Is llCreatelink() always be called from within the parent script (and the parent adds them to the list), or, after the first child is created, is it called from within the child script (where each new link is connected to the previous child)?***
thanks in advance Ed
|
Moopf Murray
Moopfmerising
Join date: 7 Jan 2004
Posts: 2,448
|
08-06-2004 05:19
OK, this might sound like a silly question - but why isn't the whole house linked? If it's linked you only need one listen in one prim that activates llDie() once and it will delete the whole house.
There's no need to use llCreateLink() if the whole house is linked and nothing else will be rezzed that requires linking.
|
Edmond Poole
Junior Member
Join date: 3 Aug 2004
Posts: 6
|
08-06-2004 06:22
ok, im confused.
what constitutes an object being linked?
are objects which reside in other objects inventory already linked? if so, oh cool, otherwise i have not activly linked anything using the edit menu: i am building this house with code.
thanks for the reply Ed
|
Moopf Murray
Moopfmerising
Join date: 7 Jan 2004
Posts: 2,448
|
08-06-2004 06:32
From: someone Originally posted by Edmond Poole ok, im confused.
what constitutes an object being linked?
are objects which reside in other objects inventory already linked? if so, oh cool, otherwise i have not activly linked anything using the edit menu: i am building this house with code.
thanks for the reply Ed OK, an object being linked means that 2 or more prims are linked together. You can link prims together by selecting one (whilst in edit mode), holding down the shift key and clicking on the second to select it. Then go to the Tools menu and you'll see an option called Link. Select that and voila, the two prims are linked together. When you take this linked object into your inventory it will appear as a single item that, when rezzed, will rez all the linked prims that make it up.
|
Edmond Poole
Junior Member
Join date: 3 Aug 2004
Posts: 6
|
08-06-2004 06:36
see though im wrighting the house in the scripting language useing llSetPrimParam() and llRezObject, so i need llCreateLink() as well
thanks Ed
|
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
|
08-06-2004 06:44
Yes, Edmond, you're correct. Since you're building prim-by-prim via script, you'll also have to link the prims via script in order to use link messaging.
You should also be aware that there are restrictions on linking. Some ratio of max dimension to max distance, and it's capped. So if it's a very large build, you have to have multiple linked sets.
_____________________
Grim
"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
|
Wednesday Grimm
Ex Libris
Join date: 9 Jan 2003
Posts: 934
|
08-06-2004 07:23
From what you've described, you shouldn't be getting "too many listens" errors.
Each house part should only need to call llListen once, in it's on_rez event handler.
Note that this is probably a bad idea, listens are computationally hard on the simulator. You should probably follow Moopf's advice, and have all your prims link so that you only need one object listening and calling llDie.
HOWEVER, be aware that llCreateLink only works when the owner of the object is on-line (and in that sim? I think?), so it's not ideal.
_____________________
Sarcasm meter: 0 |-----------------------*-| 10 Rating: Awww Jeeze!
|
Larry Manilow
|\|00b33
Join date: 1 Jul 2004
Posts: 15
|
08-09-2004 00:25
There is also a bug, or was the last time I tried it, which almost completely prevents prims from creating links unless they are the root prim in the link.
That is to say, that in the invocation llCreateLink(key target, integer parent), parent should always be true.
If it isn't things get really wierd and spooky; specficially your script execution will freeze until something happens (not quite sure what, but selecting and selecting the link set is one example).
At least, this was the case a few releases ago. Sounds like, for your application, this may not be an issue anyhow.
_____________________
-lm
|
Edmond Poole
Junior Member
Join date: 3 Aug 2004
Posts: 6
|
08-09-2004 03:05
Thanks for you help i think i got it now.
Ed
|