Hello ,
I have a script that I put in a prim with my animation, but I would like to be able to integrate some modifications that I apparently can't do ^^ ^^.
I would like to know if by putting in my prim an animation and a sound it is possible that when I wear the prim it plays my animation and the sound at the same time as the animation with a style timer every 30 seconds.
I would like to know if I can put an animation and a sound instead of the animations in the object.
I put my script if ever a person has a light ^^ ^
string gAnimName = "anim";
default
{
state_entry()
{
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); // ask the owner for permission to trigger animations
llSetTimerEvent(0.5);//I added this line.
//llStartAnimation(gAnimName);
}
on_rez(integer param)
{
llResetScript(); // reset the script as soon as it starts.
}
attach(key id)
{
integer perm = llGetPermissions();
if (id != NULL_KEY) // make sure we're actually attached.
{
if (! (perm & PERMISSION_TRIGGER_ANIMATION)) // remember to use bitwise operators!
{
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); // request permissions from the owner.
}
}
else
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
llStopAnimation(gAnimName); // stop the animation
}
}
}
timer()
{
llStopAnimation(gAnimName);
llStartAnimation(gAnimName);
}
}
thank you in advance