|
Davey Bigwig
Registered User
Join date: 8 Dec 2005
Posts: 3
|
02-19-2006 21:45
Alright. I got this really funky setup going here. I have an attachment that attaches to my body. It's a 2D sprite AV. What the setup is is that there's this main body sprite that walks, jumps and all, and there's this arm (weapon) object right in front of the body that changes texture into a whip for a second when you click on the main body, then it dissapears. That whip object is a child link, so the setup here is the script that I want to edit is a child link that is attached to me. What I want this script to do is whenever the whip changes into the actual whip (when the person clicks on his AV), I want the whip to detect whatever it is touching or whatever is in it's space and send it flying a bit away from me.
Now the problem. The problem is is that I cannot get the darn thing to detect at all, either when the whip is off or on. I don't know what is causing it, but the collision event is not registering at all. I know the listening calls between the two objects is perfect, seeing as the whip action works, but it's just the attack. I want the collision to detect any object whithin it at a certain time (a.k.a when the whip gets the message from the main body). Any ideas on how I could accomplish this? Any help would be appreciated. Thanks.
Davey Bigwig.
|
|
Davey Bigwig
Registered User
Join date: 8 Dec 2005
Posts: 3
|
02-20-2006 22:28
No one wishes to reply? Well, anyways, after I asked around, I found out that really, I can't use sensors and llVolumeDetect and collisions on child linked attached objects. I was given advice though, that I would spawn an invisible object that had llVolumeDetect on it, so I could use the command and surley be able to hit someone. Unfortinatley, I cannot get my attached object's rotation settings (my pelvis rotation settings). Instead, I get the rotation of my camera viewing my AV. So, the question ultimatley lies down to this. Is there a way to actully get the rotation of either the pelvis itself OR the object attached to it? Anyone who knows their trickery of LSL and mathematical knowledge, please help me here. Anything can be useful if it works. Thanks and I hope I get some replies  Davey Bigwig
|
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
02-21-2006 10:02
From: Davey Bigwig So, the question ultimatley lies down to this. Is there a way to actully get the rotation of either the pelvis itself OR the object attached to it? Anyone who knows their trickery of LSL and mathematical knowledge, please help me here. Anything can be useful if it works. Thanks and I hope I get some replies  No, this isn't possible. The reason is because the avatar could really be in any position due to animations, and the sim itself doesn't actually keep track of the state of avatars with animations playing, it only keeps track of what animations are playing; the clients handle the actual animations. Animations can load at different times for different clients, so there's not really even any guarantee that everyone sees someone in the exact same position at the same time! The best you'll get is using llGetRot() to detect where the avatar "nominally" is. Fortunately, people are mostly used to the fact that attachments can't really be completely clear on where they are 
|