Eyerocker Picket
Imaginary Menagerie Mgr.
Join date: 18 Sep 2006
Posts: 151
|
01-09-2008 08:01
Iv'e made a nice little object (a teddy bear) for my little girl to hold and created a very simple animation of holding it in the left arm. My question is how do I make the animation fire when the object is worn. I have a free animation override that I have placed the animation into and can make work that way, but if my girl puts that on it turns off her other. I could give her the animation and have her put it into her sorta expensive store bought modifiable but no copy animation override but that might prove difficult for less experienced editors and she might break it.
I have a bunch of items of my own, like a scuba tank, cigars, and etc, that when I choose to wear them the animation starts automatically. Is there someting else I need to do to the animation to make it start when worn? I tried placing the animation into the root prim of the object but that didnt make it fire. I know its probably something very simple and I've asked several people in world but the best responce I've gotten is use an AO.
thank you in advance for your help
|
Professor Sadovnycha
Registered User
Join date: 8 Mar 2007
Posts: 2
|
Use a freebie click script
01-09-2008 10:17
Grab your basic freebie whip or riding crop and chances are it will contain a full-perm script that will play an anim when worn, and play another anim when the wearer clicks the left mouse button. I will probably also play two sound -- before and then during the second anim.
The simplest was to use the script would be to note the names of the anims and sound in the order they play (they should be included in the Contents of the original item), install two anims and two sounds you want to use in your object, change their names to the names of the original item's contents (so the unaltered script will seek/play those new anims/sound in the desired order.
Or you can crack open the script and modify it.
|
Crystal Falcon
Registered Silly User
Join date: 9 Aug 2006
Posts: 631
|
01-09-2008 10:27
Create a new script in the object, select all and delete everything, then copy/paste this script from the LSL wiki and save it:  Simply replace "sit" with the exact name of your animation in the root prim of the object. 
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
01-09-2008 18:48
go to the last tab in the object editor, press new script, when it loads, double click on it, delete the contents of the scripts and paste the following into it then save. string gStrAnimationName = "TBearHold"; //-- change the name to match your animation
default{ attach( key vKeyAvID ){ if (vKeyAvID){ llRequestPermisions( vKeyAvID, PERMISSION_TRIGGER_ANIMATION ); }else{ if (PERMISSION_TRIGGER_ANIMATION & llGetPermissions()){ llStopAnimation( gStrAnimationName ); } } }
run_time_permissions( integer vBitPermissions ){ if (PERMISSION_TRIGGER_ANIMATION & vBitPermissions){ llStartAnimation( gStrAnimationName ); } } }
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|