LlList2Key/fr
From Second Life Wiki
| Portail LSL | | | Fonctions | | | Évènements | | | Types | | | Constantes | | | Contrôle d'exécution | | | Bibliothèque de scripts | | | Tutoriels |
Fonction: key llList2Key( list src, integer index );
| 189 | N° de fonction |
| 0.0 | Délai |
| 10.0 | Energie |
Renvoie un correspondant à l’élément de l’index du src.
| • list | src | |||
| • integer | index |
index accepte les index négatifs.
Si le type de l’élement identifié par l’index du list src n’est pas un key, il est converti en key, si ce n’est pas possible, la fonction renvoie un string null (idem si l’index est non reconnu).
Exemples
// Mieux visible dans l’historique du Chat (ctrl-h)
default
{
state_entry()
{
list my_list = ["a", 1, 2.0, <1,2,3>, <1,2,3,4>, llGetOwner()];
integer i;
for (i=0;i<llGetListLength(my_list); ++i)
{
llOwnerSay("string=" + llList2String(my_list,i)
+ "\n integer=" + (string)llList2Integer(my_list,i)
+ "\n float=" + (string)llList2Float(my_list,i)
+ "\n vector=" + (string)llList2Vector(my_list,i)
+ "\n rot=" + (string)llList2Rot(my_list,i)
+ "\n key=" + (string)llList2Key(my_list,i) );
}
}
}
Voir également
Fonctions
| • llGetListEntryType | Renvoie le type d’un élément. | |||
| • llList2String | Renvoie un élément d’un list |
Articles
| • | Negative_Index |

