Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Anim prob

RaveWolf Strauss
Registered User
Join date: 1 Jan 2006
Posts: 53
10-17-2008 21:46
this script i thought i could use in a worn object and be able to start and stop the animation in channel 3 but for some reason it dosesnt seem to work right can you all give it a look and help me out pls....


CODE

integer CHANNEL = 3; // Remember to say "/3 on" to start the animation.
string msg; // To know what listen() heard, later when get permissions
string anim; // To use the (first) animation in the object's contents

animStartOrStop()
{
if (msg == "on")
llStartAnimation(anim);
else
llStopAnimation(anim);
}


default
{
state_entry()
{
anim = llGetInventoryName(INVENTORY_ANIMATION, 0);
llListen(CHANNEL,"",llGetOwner(),"");
}
listen(integer channel, string name, key id, string message)
{
msg = llToLower(message);
if ((msg == "on") || (msg == "off"))
{
if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION)
animStartOrStop();
else
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
}
}
run_time_permissions(integer perms)
{
if (perms & PERMISSION_TRIGGER_ANIMATION)
animStartOrStop();
}
}


thank you for any help
RaveWolf Strauss
Registered User
Join date: 1 Jan 2006
Posts: 53
nm duh....
10-17-2008 21:52
nm i figured what i did wrong lol