Im having some probs with this script. Upon recieving a link message, It is suppose to trigger the animation and facial animations(by timer event).which works fine.
however whenever I attaached this to HUD, the facial animations starts playing already. How can I have the facial animations (timer event) to only start when it recieves the link_message?
Hope someone can help me on this.. been wrecking my brains

much appreciated.
here's the code:
CODE
string ANIMATION = "SillyDance";
string EMOTE = "express_surprise_emote";
default
{
state_entry()
{
}
link_message(integer int,integer num,string str,key id)
{
if(str == "pressed")
{
llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION);
llStopAnimation(EMOTE);
}
}
run_time_permissions(integer perm)
{
if(perm & PERMISSION_TRIGGER_ANIMATION)
{
llStartAnimation(ANIMATION);
llSetTimerEvent(0.9);
}
}
timer()
{
llStopAnimation(EMOTE);
llStartAnimation(EMOTE);
}
}