Thank you Quistess, shame on me for not having checked. Thanks Frionil for this suggestion
Indeed, as Frionil pointed out, I came up against : Script trying to trigger animations but PERMISSION_TRIGGER_ANIMATION permission not set
To fix this I used llRequestPermissions.
So I modified the script as follows :
string animation = "MOAN_STOP-EYES"; // Nom de l'animation à jouer
integer menu_channel = -17;
integer menu_handler;
default
{
state_entry()
{
llSetTouchText("Cliquez ici pour ouvrir le menu"); // Texte lorsqu'on touche le prim
// Création du menu
menu_handler = llListen(menu_channel, "", llGetOwner(), "");
llListenControl(menu_handler,FALSE);
// Demande de la permission PERMISSION_TRIGGER_ANIMATION
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
}
touch_start(integer total_number)
{
llOwnerSay("Ouverture du menu..."); // Message dans le chat du propriétaire
// Création du menu
llListenControl(menu_handler,TRUE);
llSetTimerEvent(60.0);
llDialog(llDetectedKey(0), "Choisissez une option :", ["Jouer Animation", "Arrêter Animation"], menu_channel);
}
listen(integer channel, string name, key id, string message)
{
if (channel == menu_channel)
{
if (message == "Jouer Animation")
{
llStartAnimation(animation);
}
else if (message == "Arrêter Animation")
{
llStopAnimation(animation);
}
llListenControl(menu_handler,FALSE);
}
}
timer()
{
llListenControl(menu_handler,FALSE);
llSetTimerEvent(0);
}
run_time_permissions(integer permissions)
{
if (permissions & PERMISSION_TRIGGER_ANIMATION)
{
llOwnerSay("Permission accordée pour déclencher des animations !");
}
else
{
llOwnerSay("Permission refusée pour déclencher des animations !");
}
}
}
the script is correct, the permissions are granted automatically but unfortunately, the animation does not start. I have the activation menu but nothing happens.
The prim is worn on the jaw.