Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need help with linked object script

Crymzon Tempura
Registered User
Join date: 25 Dec 2005
Posts: 6
05-16-2006 20:13
I have searched and worked for hours and cant quite figure it out. I have made a project it has 3 prims but when i put the animation and script for it in the parent prim of the linked project if i touch the other prims it does not work. only if I touch the prim that the script and animation is in. Please can someone explain to me how I can make this work by touching any of them. I am very new to scripting and don't grasp most of it and this here stumps me and I'm sure it is quite easy. I appreciate anyones help and I hope this was the right forum to post in.
Zalandria Zaius
Registered User
Join date: 17 Jan 2004
Posts: 277
multi prims
05-16-2006 20:20
If the child prims have scripts of their own with touch events they won't trigger the parent unless you put in llPassTouches(TRUE);
Crymzon Tempura
Registered User
Join date: 25 Dec 2005
Posts: 6
05-17-2006 02:35
Thank you for you answer :) but in my tiredness last night I see i explained myself not so well. I have made and object that i have uses a pose ball script in where you use the sit on command.I have the script an animation in one prim and I make it my parent trim but when linked if I sit on any prim but the parent it will not follow through with the correct animation it only does a regular sit animation not even at the alignment i have set for the parent. It is so hard for me to explain seeings though I dont know much about what Im doing. But I guess we all have to start somewhere :) Thanks again for your patience and help
Jigsaw Partridge
A man of parts
Join date: 3 Apr 2005
Posts: 69
05-17-2006 03:04
When you choose 'sit' from a child prim, does the avatar sit on the child prim, or on the root prim? If it sits itself on the child, then it may be that you have a 'sit target' set on the child prim (this can happen if you put a script in it which sets a sit target, and then forget to remove the sit target when you take the script out).

If it sits as it should on the root prim, even when you choose 'sit' from a child, then I am not sure what the problem is, I am afraid.
Crymzon Tempura
Registered User
Join date: 25 Dec 2005
Posts: 6
05-17-2006 05:19
Thank you Jigsaw :) so what you are saying is if I had a script in the child prim and took it out it still can hold the sit target? Because there are nothing in the child prims at this time. So lets say there is a sit target left behind on this prim I will have to make new prim then and start over? I cant really tell if I am sitting on child prim or not for i have adjusted for another animation and I sit well below the other prim. But I am assuming I am sitting on the child prim. Thanks again for all the help. I feel lucky to have a forum that I can come to and actually get some help :)
Jigsaw Partridge
A man of parts
Join date: 3 Apr 2005
Posts: 69
05-17-2006 05:33
Yes, sit targets, once set by a script, stay with the prim forever, until they get removed by another script.

You can either make another prim to replace the one you have :( , or you can just make a quick script that removes the sit target, put it in the prim and activate it (e.g. with a touch handler), then take the script out again. To remove the sit target, your script must call llSitTarget() with the offset argument set to ZERO_VECTOR.

To check if this is really the problem or not, you could just link another prim quickly to your object, and try sitting on it. If your avatar sits properly on the root when that new prim is chosen, then that suggests the other child prims have their own sit targets, which is what is confusing things.
Merlin Alphabeta
Registered User
Join date: 12 Feb 2006
Posts: 83
05-17-2006 09:21
From: Jigsaw Partridge
Yes, sit targets, once set by a script, stay with the prim forever, until they get removed by another script.

You can either make another prim to replace the one you have :( , or you can just make a quick script that removes the sit target, put it in the prim and activate it (e.g. with a touch handler), then take the script out again. To remove the sit target, your script must call llSitTarget() with the offset argument set to ZERO_VECTOR.

To check if this is really the problem or not, you could just link another prim quickly to your object, and try sitting on it. If your avatar sits properly on the root when that new prim is chosen, then that suggests the other child prims have their own sit targets, which is what is confusing things.



Yes all of the following stay with the prim even if you delete the script:

llSitTarget - remove by setting to ZERO_VECTOR, as described above
llSetParticleSystem - remove by calling a blank llSetParticleSystem( [] );
llTargetOmega - remove by zeroing out
llTextureAnim - remove by calling with no animation, x and y sizes of 1, start and end of zero, and any framerate you like. There may be better ways to do this...
llSetText - set text to an empty string ("";)