Difference between revisions of "LlGetAnimationList/fr"
Jump to navigation
Jump to search
Gally Young (talk | contribs) m (fixe) |
Gally Young (talk | contribs) m (updated) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 4: | Line 4: | ||
|func_footnote | |func_footnote | ||
|func_desc | |func_desc | ||
|return_text=de toutes les animations jouées (actuellement) par l'avatar identifié par | |return_text=de toutes les animations jouées (actuellement) par l'avatar identifié par sa clé '''id'''. | ||
|spec | |spec | ||
|caveats=*Il n'existe aucune fonction ou mécanique interne pour obtenir le nom d'une animation jouée. | |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/fr|llGetAgentInfo]]|Renvoie des informations sur l'avatar}} | |also_functions={{LSL DefineRow||[[llGetAgentInfo/fr|llGetAgentInfo]]|Renvoie des informations sur l'avatar}} | ||
{{LSL DefineRow||[[llGetAnimation/fr|llGetAnimation]]|Renvoie une information sur l'animation | {{LSL DefineRow||[[llGetAnimation/fr|llGetAnimation]]|Renvoie une information simplifiée à outrance sur l'animation en cours}} | ||
{{LSL DefineRow||[[llStartAnimation/fr|llStartAnimation]]|Lance une animation}} | {{LSL DefineRow||[[llStartAnimation/fr|llStartAnimation]]|Lance une animation}} | ||
{{LSL DefineRow||[[llStopAnimation/fr|llStopAnimation]]|Stoppe une animation en cours}} | {{LSL DefineRow||[[llStopAnimation/fr|llStopAnimation]]|Stoppe une animation en cours}} |
Latest revision as of 01:27, 6 July 2008
LSL Portail Francophone | LSL Portail Anglophone | Fonctions | Évènements | Types | Operateurs | Constantes | Contrôle d'exécution | Bibliothèque | Tutoriels |
Description
Fonction: list llGetAnimationList( key id );266 | N° de fonction |
0.0 | Delais |
10.0 | Energie |
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.