Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How do you make an object attached to an avatar behave

Brett Brocco
Registered User
Join date: 11 Jul 2005
Posts: 4
10-28-2005 08:49
I have a staff that I can attach to my avatar's hand, but it remains horizontal when walking and standing. I'd like it to remain verticle, so it would act as a staff in real life would. Thanks in advance!
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
10-28-2005 08:56
Add this script inside:
CODE

default
{
attach(key id) { if (id) { llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); }else if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) llStopAnimation("hold_r_handgun"); }
run_time_permissions(integer p) { if (p) llStartAnimation("hold_r_handgun"); }
}


This will only work with the right hand. Also it might look weird when you are in mouselook mode.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Brett Brocco
Registered User
Join date: 11 Jul 2005
Posts: 4
That partially worked....
10-28-2005 09:32
Now the staff is attached to my right hand, and remains in front of me when I walk, but it is still horizontal, not verticle. The staff itself is composed of about 20 cylindars linked together so it looks like a branch off a tree. Don't know if that matters or not.
I also tried other commands, like hold_r_bazooka, etc., but none seem to do the trick.

The point_you command works for a second, but then the avatar resumes the default pose. Any way to use it?

I can create custom animations if needed. If so, what do I need to do?
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
10-28-2005 11:24
From: Brett Brocco
Now the staff is attached to my right hand, and remains in front of me when I walk, but it is still horizontal, not verticle.


So rotate it so it's vertical, and it'll stay vertical.
Noel Marlowe
Victim of Occam's Razor
Join date: 18 Apr 2005
Posts: 275
10-28-2005 14:09
You could just record the animation of just your arm movement. Since you would use the same frame over and over again, it might look a little stiff. So you might need to make two. One fixed for standing still and another that is made up of several frames to give it a little bob while you walk. You will need to test a bit to get the timing down. You will also give it a higher priority than the default movement animations. This will keep you from breaking out of the staff pose when you stand at rest. Then put the animations along with a script that plays the appropriate animation in the staff. I think I might still have a martini or wine glass that kept me in a connoisseur pose. It just afftected me from the waist up, so I could still walk around while holding the glass. I might have tossed it as it always looked like a hexagon unless you zoomed in on it as it wasn't that big.

The only problem you might run in to is if you want to have another animation affect you while you are carrying the staff.