VirtualWorlds Italia

Area Amministrativa => Amministratori => Archivio => Discussione aperta da: Neuromancer il 26 Agosto 2010, 18:33:02

Titolo: test code lsl
Inserito da: Neuromancer il 26 Agosto 2010, 18:33:02
Codice (lsl) Seleziona
// Basic Animation / Attachment 1.0
// Catherine Omega Heavy Industries

string gAnimName = "sit"; // what animation to play?

default
{
    state_entry()
    {
        llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); // ask the owner for permission to trigger animations
        llStartAnimation(gAnimName); // automatically trigger animation.
    }
   
    on_rez(integer param)
    {
        llResetScript(); // reset the script as soon as it starts.
    }
   
    attach(key id)
    {
        integer perm = llGetPermissions();
       
        if (id != NULL_KEY) // make sure we're actually attached.
        {        
            if (! (perm & PERMISSION_TRIGGER_ANIMATION)) // remember to use bitwise operators!
            {
                llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); // request permissions from the owner.
            }                
        }
        else
        {
            if (perm & PERMISSION_TRIGGER_ANIMATION)
            {
                llStopAnimation(gAnimName); // stop the animation
            }
        }
    }
}

Titolo: RE: test code lsl
Inserito da: Absynth il 26 Agosto 2010, 22:21:37
bella, ma sminchia il layout.

se c'è un opzione "a capo automatico" (o un limite al numero di caratteri per riga) è ok
o al limite, ridurre un po il font?
Titolo: RE: test code lsl
Inserito da: Neuromancer il 27 Agosto 2010, 00:38:30
work in progress :p

ci ho perso l'intero pomeriggio a copiare, a manina, tutte le istruzioni, variabili, fisse, lazzi & mazzi nel file di linguaggio :p