« Scripts LSL - porte » : différence entre les versions
Aller à la navigation
Aller à la recherche
(Page créée avec « {| |<gallery> Fichier:image.png </gallery> |<source lang="ada"> /* Script Acryline Erin 2019 Porte Version 1 Licence : Attribution - Pas d’Utilisati... ») |
Aucun résumé des modifications |
||
| Ligne 64 : | Ligne 64 : | ||
</source> | </source> | ||
|} | |} | ||
[[Catégorie:Scripts LSL]] | |||
Version du 17 décembre 2019 à 21:02
<source lang="ada">
/* Script Acryline Erin 2019 Porte Version 1 Licence : Attribution - Pas d’Utilisation Commerciale 4.0 France (CC BY-NC 4.0 FR) https://creativecommons.org/licenses/by-nc/4.0/fr/ Placer le script dans une primitive. */ integer ouverture =0; default { touch_start(integer nbr)
{
if(ouverture ==0)
{
ouverture =1;
state ouvrir;
}
if(ouverture == 1)
{
ouverture = 0;
state fermer;
}
}
} state ouvrir { state_entry()
{
rotation rot = llGetRot();
// Sens 1
rotation delta = llEuler2Rot(<0.0,0.0,PI/2>);
// Sens 2
//rotation delta = llEuler2Rot(<0.0,0.0,-PI/2>)
rot = delta * rot;
llSetRot(rot);
state default;
}
} state fermer { state_entry()
{
rotation rot = llGetRot();
// Sens 1
rotation delta = llEuler2Rot(<0.0,0.0,-PI/2>);
// Sens 2
//rotation delta = llEuler2Rot(<0.0,0.0,-PI/2>)
rot = delta * rot;
llSetRot(rot);
state default;
}
} </source> |