I could use your help to finish this. Please add any animations that I've missed
syntax:
string hpAnimation2String(key anim);
input:
key of an animation
output:
If key is a default animation, the string of the name of that animation,
else, return "".
how:
I'm creating a simple list of default animations and keys, sorting them, then hard coding the translator. I'll search using binary search, to opimize it to a few comparisons instead of a few dozen.
preliminary list:
This is unsorted, and unformatted. Please respond in thread with more that you find.
This is just rough, since I am short on time tonight. I'll post the actual translation script later.
GetAnimationLIst2String: 0

GetAnimationLIst2String: 1:Turning Right:2d6daa51-3192-6794-8e2e-a15f8338ec30
GetAnimationLIst2String: 2:Turning Left:56e0ba0d-4a9f-7f27-6117-32f2ebbf6135
GetAnimationLIst2String: 3:Crouching:201f3fdf-cb1f-dbec-201f-7333e328ae7c
GetAnimationLIst2String: 4:CrouchWalking:47f5f6fb-22e5-ae44-f871-73aaaf4a6022
GetAnimationLIst2String: 5

GetAnimationLIst2String: 6:Jumping:2305bd75-1ca9-b03b-1faa-b176b8a8c49e
GetAnimationLIst2String: 7:Hovering Up:62c5de58-cb33-5743-3d07-9e4cd4352864
GetAnimationLIst2String: 8:Hovering:4ae8016b-31b9-03bb-c401-b1ea941db41d
GetAnimationLIst2String: 9:Hovering Down:20f063ea-8306-2562-0b07-5c853b37b31e
GetAnimationLIst2String: 10:Landing:7a17b059-12b2-41b1-570a-186368b6aa6f
GetAnimationLIst2String: 11:Falling Down:666307d9-a860-572d-6fd4-c3ab8865c094
GetAnimationLIst2String: 12

GetAnimationLIst2String: 13:Walking:349a3801-54f9-bf2c-3bd0-1ac89772af01
GetAnimationLIst2String: 14:Running:05ddbff8-aaa9-92a1-2b74-8fe77a29b445
GetAnimationLIst2String: 15

GetAnimationLIst2String: 16

pre-script:
This code collects animations and keys. Please respond to this thread with your own that I've missed.
WARNING: DO NOT LEAVE THIS OUT REZZED WHEN NOT IN USE AS IT HAS A 0.1s TIMER!
CODE
list anims = [];
list keys = [];
list current;
string cur;
integer c;
integer d;
default
{
on_rez(integer p)
{
llOwnerSay("Animation Collector started. PLEASE DO NOT LEAVE THIS OUT REZZED - This script has a 0.1s timer!");
llSetTimerEvent(0.1);
}
timer()
{
current = [];
current = llGetAnimationList(llGetOwner());
cur = llGetAnimation(llGetOwner());
//llOwnerSay("DEBUG:"+cur+":"+llList2String(current,0));
for(c=0;c<llGetListLength(keys);++c)
{
if(cur == llList2String(anims,c))
{
return;
}
}
llOwnerSay("Anim found! "+cur+":"+llList2String(current,0));
anims += cur;
keys += llList2String(current,0);
}
touch(integer n)
{
if(llDetectedKey(0) == llGetOwner())
{
llOwnerSay("Outputting list of animations and keys:");
for(d=0;d<llGetListLength(keys);++d)
{
llOwnerSay( (string)d +":"+ llList2String(anims,d) +":"+ llList2String(keys,d));
}
}
}
}