Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

crouch animation overrride help

Pinto Schnyder
Registered User
Join date: 23 May 2007
Posts: 17
09-06-2007 22:17
Hello there everyone I was wondering if anyone has a idea how to script a lil AO that when you crouch you do a blocking animation. I'm doing this for a combat sheild that actually blocks bullets it covers an need a way to get it to do my blocking pose without the need of a combat system. can anyone help me here?
Pinto Schnyder
Registered User
Join date: 23 May 2007
Posts: 17
09-07-2007 15:05
FYI this sheild only covers a area infront of the player when in the blocking pose you can still get hit while using it
Dave Bellman
Registered User
Join date: 10 Oct 2006
Posts: 123
09-10-2007 00:44
You could just use a free AO script (i.e. from inside ZHAO II) and just overide the 'crouch' animation only. This would be a way to test your 'blocking' animation.

However, running an entire AO script just for one animation may be a little excessive! It would cause less lag if you wrote a short script yourself.

Full details of what you need to do can be found in the scripting forum, but as a brief guide,
just set a timer event (say every 0.02) in state_entry(), and do this for the 'timer()' event handler:

timer()
{
string anim_state = llGetAnimation(llGetPermissionsKey());

if(anim_state=="Crouching";)
{
llStartAnimation("your blocking animation here";);
return;
}
}

I hope this helps!

; - Dave
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
09-10-2007 08:22
A timer on 0.02 might be laggier than the full ZHAO script. Do you really need 1/50th of a second response time for this? Try 0.2 seconds :)
Dave Bellman
Registered User
Join date: 10 Oct 2006
Posts: 123
09-11-2007 01:56
oops - yes, that should have been 0.2 - thanks Ziggy