Difference between revisions of "LlGetAnimationList/fr"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{LSL Function/avatar|id|sim=*}}{{LSL_Function |func_id=266|func_sleep=0.0|func_energy=10.0 |func=llGetAnimationList|return_type=list|p1_type=key|p1_name=id |func_footnote |func_desc |retu...)
 
m (updated)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{LSL Function/avatar|id|sim=*}}{{LSL_Function
{{LSL Function/avatar/fr|id|sim=*}}{{LSL_Function/fr
|func_id=266|func_sleep=0.0|func_energy=10.0
|func_id=266|func_sleep=0.0|func_energy=10.0
|func=llGetAnimationList|return_type=list|p1_type=key|p1_name=id
|func=llGetAnimationList|return_type=list|p1_type=key|p1_name=id
|func_footnote
|func_footnote
|func_desc
|func_desc
|return_text=of all playing animations for avatar '''id''' by key.
|return_text=de toutes les animations jouées (actuellement) par l'avatar identifié par sa clé '''id'''.
|spec
|spec
|caveats=*There is no internal mechanism to get the name of the animations playing.
|caveats=*Il n'existe aucune fonction ou mécanique interne pour obtenir le nom d'une animation jouée.
|constants
|constants
|examples
|examples=
Cet exemple est quelque peu complexe, mais il n'y a pas beaucoup d'applications simples de cette fonction.
<lsl>// Remplacement simple de l'animation de marche (AO, Animation Overrider)
 
key vieille_anim = "6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0";
string nouvelle_anim = "yoga_float";
integer etat;
list verif;
key proprio;
 
default
{
    state_entry()
    {
        proprio = llGetOwner();
        llRequestPermissions(proprio, PERMISSION_TRIGGER_ANIMATION);
        verif = [ vieille_anim ];
    }
   
    run_time_permissions(integer p)
    {
        if (p & PERMISSION_TRIGGER_ANIMATION)
        {
            llSetTimerEvent(0.2);
        }
    }
 
    timer()
    {
        if (llGetAgentInfo(proprio) & AGENT_WALKING)
        {
            list anims = llGetAnimationList(proprio);
            if (~llListFindList(anims, verif))
            {
                etat = 1;
                llStartAnimation(nouvelle_anim);
                llStopAnimation(vieille_anim);
            }
        }
        else if (etat)
        {
            llStopAnimation(nouvelle_anim);
            etat = 0;
        }
    }
 
    on_rez(integer p)
    {
        llResetScript();
    }
}</lsl>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetAgentInfo]]|Gets the avatar info}}
|also_functions={{LSL DefineRow||[[llGetAgentInfo/fr|llGetAgentInfo]]|Renvoie des informations sur l'avatar}}
{{LSL DefineRow||[[llGetAnimation]]|Get an over simplified avatar info string}}
{{LSL DefineRow||[[llGetAnimation/fr|llGetAnimation]]|Renvoie une information simplifiée à outrance sur l'animation en cours}}
{{LSL DefineRow||[[llStartAnimation]]|Start an animation on an avatar}}
{{LSL DefineRow||[[llStartAnimation/fr|llStartAnimation]]|Lance une animation}}
{{LSL DefineRow||[[llStopAnimation]]|Stop an animation playing on an avatar}}
{{LSL DefineRow||[[llStopAnimation/fr|llStopAnimation]]|Stoppe une animation en cours}}
|also_events
|also_events
|also_tests
|also_tests
|also_articles
|also_articles
|notes
|notes
|cat1=Avatar
|cat1=Avatar/fr
|cat2=Animation
|cat2=Animation/fr
|cat3
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 01:27, 6 July 2008

Description

Fonction: list llGetAnimationList( key id );

Renvoie un list de toutes les animations jouées (actuellement) par l'avatar identifié par sa clé id.

• key id UUID d'avatar qui est dans la même region

Avertissements

  • Il n'existe aucune fonction ou mécanique interne pour obtenir le nom d'une animation jouée.

Exemples

Cet exemple est quelque peu complexe, mais il n'y a pas beaucoup d'applications simples de cette fonction. <lsl>// Remplacement simple de l'animation de marche (AO, Animation Overrider)

key vieille_anim = "6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"; string nouvelle_anim = "yoga_float"; integer etat; list verif; key proprio;

default {

   state_entry()
   {
       proprio = llGetOwner();
       llRequestPermissions(proprio, PERMISSION_TRIGGER_ANIMATION);
       verif = [ vieille_anim ];
   }
   
   run_time_permissions(integer p)
   {
       if (p & PERMISSION_TRIGGER_ANIMATION)
       {
           llSetTimerEvent(0.2);
       }
   }
   timer()
   {
       if (llGetAgentInfo(proprio) & AGENT_WALKING)
       {
           list anims = llGetAnimationList(proprio);
           if (~llListFindList(anims, verif))
           {
               etat = 1;
               llStartAnimation(nouvelle_anim);
               llStopAnimation(vieille_anim);
           }
       }
       else if (etat)
       {
           llStopAnimation(nouvelle_anim);
           etat = 0;
       }
   }
   on_rez(integer p)
   {
       llResetScript();
   }

}</lsl>

Voir également

Fonctions

•  llGetAgentInfo Renvoie des informations sur l'avatar
•  llGetAnimation Renvoie une information simplifiée à outrance sur l'animation en cours
•  llStartAnimation Lance une animation
•  llStopAnimation Stoppe une animation en cours
Vous cherchez encore des informations ? Peut-être cette page du LSLwiki pourra vous renseigner.