Jump to content

takean123

Resident
  • Posts

    5
  • Joined

  • Last visited

Reputation

0 Neutral
  1. 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.
  2. Hello Quistess, thank you for this help. Well seen; a big mistake on my part. Unfortunately, even with this modification the script has no effect. The animation works when I use it from my inventory but it seems that the menu does not communicate the action to be performed. My best wishes for this new year.
  3. Hello everybody, I just wrote this script which is correct but unfortunately has no effect. The prim containing the script and animation is touch-activatable and is worn on the avatar's head. When you touch the prim, a menu appears to start the animation and of course stop it. string animation = "MOAN_STOP-EYES"; // Nom de l'animation à jouer integer menu_handler; default { state_entry() { llSetTouchText("Cliquez ici pour ouvrir le menu"); // Texte lorsqu'on touche le prim } touch_start(integer total_number) { llOwnerSay("Ouverture du menu..."); // Message dans le chat du propriétaire // Création du menu menu_handler = llListen(-1, "", llGetOwner(), ""); llDialog(llDetectedKey(0), "Choisissez une option :", ["Jouer Animation", "Arrêter Animation"], menu_handler); } listen(integer channel, string name, key id, string message) { if (channel == menu_handler) { if (message == "Jouer Animation") { llStartAnimation(animation); } else if (message == "Arrêter Animation") { llStopAnimation(animation); } } } } So the script is correct, the animation is declared well, it's in the prim, but it doesn't work. Do you have a suggestion for me to try another approach? Thank you in advance for your help. Have a good New Year's Eve and take care of yourself in rl. Ps: I am French-speaking and I use a translator. Sorry if the subject presents any misunderstandings. Do not hesitate to ask questions.
  4. Thank you Quistess Alpha for this reply. I'm on a sandbox that allows rezz for two days in a row. I tested it on my own turf but the result was identical. I'll test with llGetInventoryName(INVENTORY_OBJECT,0)
  5. Hi everyone, as you can imagine, if I come to the forum it's to get help with a script. The synthaxis is good but the script doesn't react as it should. This is a script that allows you to rezzer 5 temporary prims randomly and automatically. Worries, nothing is rezzed even though the script is saved correctly and the temporary prim is in the receive prim. PS: I don't have a statement from Beug regarding the script and the prim to rezzer is correctly identified in the script and it is in the receiving prim Thanks in advance to those who will look into this script integer total_prims = 5; // Nombre total de prims à créer float curve_amount = 0.1; // Quantité d'incurvation de la position de chute float rez_interval = 5.0; // Intervalle entre chaque résurrection en secondes vector start_position = <128.0, 128.0, 25.0>; // Position de départ des prims key rezzing_object; // Clé de l'objet de résurrection default { state_entry() { llSay(0, "Initialisation du script..."); // Stocker la clé de l'objet de résurrection (la boîte de rezzing) rezzing_object = llGetKey(); // Mettez ici la clé de votre boîte de rezzing // Démarrer la minuterie pour la résurrection automatique llSetTimerEvent(rez_interval); } timer() { integer i; vector position = start_position; for (i = 0; i < total_prims; ++i) { vector curve = <llFrand(curve_amount), llFrand(curve_amount), 0.0>; vector final_position = position + curve; llRezObject("prim cafe", llGetPos() + final_position, ZERO_VECTOR, ZERO_ROTATION, 0); // Remplacez "prim cafe" par le nom exact de votre prim à rezzer tel qu'il apparaît dans votre inventaire position += <1.5, 0.0, 0.0>; // Espacement horizontal entre les prims } } }
×
×
  • Create New...