Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Typing AO script...

Ecks Bowman
Registered User
Join date: 6 Sep 2006
Posts: 90
06-13-2007 06:15
I found a free Typing AO script that hides the prim when not typing then when you type it shows the prim but it uses the default typing animation.. what i want to know is how can I make it use a custom animation?

I'm making a animation where it makes the avatar look like he is pushing buttons and I want the script to use that animation.. I have no idea how to script but any tips u can give or write me a free script *wink wink* :) would be great..

thx
Solomon Devoix
Used Register
Join date: 22 Aug 2006
Posts: 496
06-13-2007 08:23
Here's something I did to simply kill the standard typing animation without having to use a custom anim. In this case, find the spot where it stops the default typing animation and just after that insert code to start your custom animation. :)

CODE

// Simple typing animation killer
//
// By Solomon Devoix
//
// Just put this script into an object you wear (perhaps one of those
// popular 'multitool' attachments) or put it into an objec on which
// you'll sit, like a poseball, that already has an animation in it
// that isn't properly overriding the typing animation.
//
// The usual behavior is that the avatar will START to make the typing
// motion, but immediately stop. So this ISN'T a perfect solution, but
// if you don't want to (or can't) use an animation that will override
// the typing animation, this may do the trick for you.
//
// Note: The 'llAvatarOnSitTarget' command in the 'changed' event will
// only report the key of the avatar sitting on the object if the
// object has had its sit target set. This doesn't matter if this
// script is in an attachment you're wearing, and if you're putting
// it into something like a poseball, odds are VERY good the sit
// target HAS been set already. But if you sit on an object containing
// this script and just keep right on typing, try un-commenting the
// 'llSitTarget' command in the 'state_entry' event, resaving the
// script, and trying it again.


key avatar = NULL_KEY;

default
{
state_entry()
{
// llSitTarget(<0.0,0.0,0.01>,ZERO_ROTATION);
}

attach(key attached)
{
if (attached)
{
avatar = attached;
llRequestPermissions(avatar, PERMISSION_TRIGGER_ANIMATION);
}
else
{
llResetScript();
}
}

changed(integer change)
{
if (change & CHANGED_LINK)
{
key agent = llAvatarOnSitTarget();
if (agent)
{
avatar = agent;
llRequestPermissions(avatar, PERMISSION_TRIGGER_ANIMATION);
}
else
{
llResetScript();
}
}
}

timer()
{
if( ( llGetAgentInfo( avatar ) & AGENT_TYPING ))
{
llStopAnimation( "type" ) ;
}
}

run_time_permissions(integer perm)
{
if ( perm & PERMISSION_TRIGGER_ANIMATION )
{
llSetTimerEvent(0.1);
}
}
}
Ecks Bowman
Registered User
Join date: 6 Sep 2006
Posts: 90
06-13-2007 08:31
Thx but like I said in my post.. I don't know how to script so I don't know the code to put in your script to make it start my own animation...
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
06-13-2007 10:28
From: Ecks Bowman
Thx but like I said in my post.. I don't know how to script so I don't know the code to put in your script to make it start my own animation...



llStartAnimation
_____________________
I'm back......
Ecks Bowman
Registered User
Join date: 6 Sep 2006
Posts: 90
06-13-2007 15:57
From: Newgate Ludd
llStartAnimation


again I don't know how to script.. I don't understand llStartAnimation... is that all I put?? or whats the other code that goes with it to make my animation work??
Jake Trenchard
Registered User
Join date: 31 May 2007
Posts: 104
06-13-2007 16:06
If you want someone to write it -for- you, go to the 'Products Wanted' forum.

If you want to learn how to script, there is a sticky thread marked 'New Scripters Start Here' at the top of this forum.

The wiki at http://wiki.secondlife.com/ also contains a page to get you to some tutorials, http://wiki.secondlife.com/wiki/LSL_Tutorial .

When you ask questions here, the answer is typically the name of a function or a snippet of example code, and integrating that into your own script is your own responsibility. That's the nature of this forum.

Oh, and the full documentation for StartAnimation is at, http://wiki.secondlife.com/wiki/LlStartAnimation