Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Animation Animator  

Animator

Functions & Commands: Agent Animator Made by Fred Kinsei

This script allows you to request permissions from another agent and then play animations on them.
Can be used for fun, modeling, or any remote animation function.

Category: Animation
By : Fred Kinsei
Created: 2010-01-10 Edited: 2014-08-11
Worlds: Second Life

the Zip file

Download all files for Animator
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Animator_1.lsl
1 //Credit to the creator:
2 //Made by SL resident Fred Kinsei
3
4 // The script holds a persons permissions until it is reset, or either the owner or the person you took permission from logs off.//
5 // All commands should be lowercase. All commands are available on channel's 0 and 3. It will only play animations from SL's
6 // default anims OR any animations within the inventory the script is in. You can place animations in before or after you have
7 // gotten someone's permissions. You can only have animation permissions from one person at a time.
8 //
9 // Commands: request name OR request self -- This gets someone's permissions, they need to be within 96 meters of you. You only need first names, or parts of first names. -- This will release any previous permissions. -- It will tell you if they accept/reject your request.
10 //
11 // play animname -- This will play the name of the animation you mentioned, this is CASE SENSITIVE. -- They must be in the same sim as you to play animations.
12 //
13 // stop -- This will stop the last played animation
14 //
15 // stop all -- This stops ALL animations they are playing, even one's you didn't start.
16 //
17 // release -- This will release your current permissions.
18
19
20 string find;
21 string anim;
22 default
23 {
24 on_rez(integer start_param)
25 {
27 }
29 {
30 llListen(0, "", llGetOwner(), "");
31 llListen(3, "", llGetOwner(), "");
32 }
33
34 listen(integer channel, string name, key id, string message)
35 {
36 if(llGetSubString(message, 0, 6) == "request")
37 {
38 find = llGetSubString(message, 8, -1);
39 if(find == "self")
41 else
42 llSensor("", "", AGENT, 96, TWO_PI);
43 }
44 else if(llToLower(llGetSubString(message, 0, 3)) == "play")
45 {
47 {
48 llStartAnimation(llGetSubString(message, 5, -1));
49 anim = llGetSubString(message, 5, -1);
50 }
51 }
52 if(message == "stop")
53 {
55 {
56 llStopAnimation(anim);
57 }
58 }
59 if(message == "stop all")
60 {
62 {
64 integer len = llGetListLength(anims);
65 integer i;
66 for (i = 0; i < len; ++i) llStopAnimation(llList2Key(anims, i));
67 }
68 }
69 if(message=="release")
71 }
73 {
75 {
77 integer len = llGetListLength(anims);
78 integer i;
79 for (i = 0; i < len; ++i) llStopAnimation(llList2Key(anims, i));
80 llOwnerSay("Permissions Accepted");
81 }
83 llOwnerSay("Permissions Denied");
84 }
85 sensor(integer num)
86 {
87 integer i;
88 for(i=0;i<num;i++)
89 {
91 {
92 llOwnerSay("Requesting " + llKey2Name(llDetectedKey(i)));
94 return;
95 }
96 }
97 }
98 }

Back to the Best Free Tools in Second Life and OpenSim.