Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
if(x==1)
{
<a>
}
else
{
<b>
}
1.3. Debug
default
{
state_entry()
{
llListen(10, "",NULL_KEY,"");
}
listen(integer channel,string objname,key
id,string str)
{
llOwnerSay("DEBUG obj: "+objname+":
"+str);
}
}
1.4. Comunicazione
integer iCHANNEL=-3000;
integer iDIALOG=-3001; // canale per
llDialog
integer iDEBUG=1;
integer iLISTEN =0;
llListenRemove (iLISTEN );
iLISTEN =0;
llMessageLinked (LINK_SET,
iCHANNEL , str , "");
}
}
1.9.B Oggetto B(finestra)
integer iCHANNEL=-3000;
integer iDEBUG =1;
debug( )....
default
{
state_ entry ()
{
}
link_ message (integer sender,
integer num, string str , key id)
{
if( num!= iCHANNEL ) return;
debug( "Received command:
"+ str );
if( str =="0%")
llSetAlpha (1,ALL_SIDES);
if( str =="50%")
llSetAlpha (0.5,ALL_SIDES);
if( str =="100%")
llSetAlpha (0,ALL_SIDES);
}
}
1.10 Come si vede i due sistemi sono analoghi e
presentano vantaggi e svantaggi: