Bonjour ,
J'ai un script que je met dans un prim avec mon animation , mais j'aimerais pouvoir y intégrer quelques modif que je ne sais faire apparemment ^^
J'aimerais savoir si en mettant dans mon prim une animation et un son il est possible que quand je porte le prim il joue mon animation et le son en même temps que l'animation avec un timer style toute les 30 secondes .
Eventuelement que je puisse mettre uuid animation et sound a la place des animation dans l'objet .
je met mon script si jamais une personne a une lumière ^^
merci d'avance
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);
}
}
Dernière modification par gxkill ; 19/11/2020 à 11h35.
|