Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Timer Event and HUD - Please help??

Vijay Uggla
Registered User
Join date: 17 May 2007
Posts: 64
08-21-2007 04:39
Hi,

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 :o
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);

}
}

_____________________
OmniPotent - Quality Animations & Loving Needs
http://slurl.com/secondlife/Memussi/67/232/54

my Store Blog:
http://vijayuggla.blogspot.com/
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
08-21-2007 11:00
What causes the timer stop?

on_rez(integer start_param)
{
llSetTimerEvent(0);
}

...could do the trick.

Scripts 'persist' while in inventory, so if the timer was already running it will still be running when you attach the object.

The attach(key attached) Event Handler can also be useful.
Vijay Uggla
Registered User
Join date: 17 May 2007
Posts: 64
08-22-2007 04:00
Thk u soooo much Pale Spec,

it works...brilliant...but then it causes some other probs for
my HUD. I guess I suck at scripting still.

back to work...
_____________________
OmniPotent - Quality Animations & Loving Needs
http://slurl.com/secondlife/Memussi/67/232/54

my Store Blog:
http://vijayuggla.blogspot.com/