State exit/fr

From Second Life Wiki

Jump to: navigation, search

Évènement : state_exit( ){ ; }

Déclenché lors d'une requalification de l'état du script.


Exemples

default
{
    state_entry()
    {
        llOwnerSay("Etat par défaut");
    }
    touch_start(integer detected)
    {
        state other;
    }
    state_exit()
    {
        llOwnerSay("On quitte l'état par défaut");
    }
}

state other
{
    state_entry()
    {
        llOwnerSay("Dans l'état \"autre\"");
    }
    touch_start(integer detected)
    {
        state default;
    }
    state_exit()
    {
        llOwnerSay("On quitte l'état \"autre\"");
    }
}

Personal tools