01-18-2009 23:28
So I've been messing with this for hours and I'm just not a good enough scripter...

I have this script that allows for a a couple of different animations to be called...

Most importantly it calls two in a row....

But I need to adapt it to a "poseball" type script and it's currently a "dance machine" type script...

Anybody have any idea how to make this work...

**************************************************************************

default
{
state_entry()
{
llSitTarget(<0.7, 0.0, -0.05>, <0.00000, 0.08716, 0.00000, 0.99619>;);
}
llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION);
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
llStartAnimation("male_test_02";);
llSetTimerEvent(5.0);
}
}
state_entry()
{
// listen on channel zero for any chat spoken by the object owner.
llListen(13,"",NULL_KEY,"";);
}

listen(integer channel, string name, key id, string message)
{
// check if the message corresponds to a predefined string.
// llToLower converts the message to lowercase.
// This way, "HELLO", "Hello" or "HeLLo" will all work the same way.
if (llToLower(message) == "test1";)
{
// if the message from the owner is "hello", respond with "Hello.".
llSleep (2);
list a=llGetAnimationList(llGetPermissionsKey());
integer b;
key c;
for (b;b<llGetListLength(a);b++)
//sometimes it gives you a null key, it's a bug.
if (c = llList2Key(a,b))
llStopAnimation((string)c);
llStartAnimation("male_test_01";);
llSleep (2);
llStartAnimation("male_test_02";);

}
else if (llToLower(message) == "test2";)
{
// if the message from the owner is "hello", respond with "Hello.".
llSleep (2);
list a=llGetAnimationList(llGetPermissionsKey());
integer b;
key c;
for (b;b<llGetListLength(a);b++)
//sometimes it gives you a null key, it's a bug.
if (c = llList2Key(a,b))
llStopAnimation((string)c);
llStartAnimation("male_test_02";);


}

}
}