1. Guest Book
Laura Antichi - @lantichi
PRESENTAZIONE SU YOUTUBE https://youtu.be/9UQ7_LxNyRY
Realizzare nei mondi virtuali un Guest Book per ottenere un report o dei consigli sulle attività che si stanno
volgendo o per attestare la propria partecipazione. È un momento sociale interessante.
Cliccando sul Guest Book si apre una finestra in cui poter inserire commenti nel limite di 30 secondi.
3. Ho inserito le immagini: quella principale e quelle associate dei fiori nel CONTENUTO andando in
“modifica”. Nel contenuto ho anche inserito lo script spiegato da Salhazar.
Lo script
list guest = [];
key avatar = NULL_KEY;
string nomeAvatar = "";
vector WHITE=<1,1,1>;
default
{
state_entry()
{
4. llSetText("Questo è il libro degli Ospiti: clicca per lasciare un commento. Sarà un interessante
feedback.nNumero di commenti finora "
+(string)llGetListLength(guest),WHITE,1);
llListen(1,"",llGetOwner(),"list");
}
touch_start(integer count)
{
avatar = llDetectedKey(0);
state leggiOpinione;
}
listen(integer channel, string name, key id, string message)
{
integer i;
llOwnerSay("Elenco dei commenti");
for(i=0;i<llGetListLength(guest);i++){
llOwnerSay((string)i+" "+llList2String(guest,i));
}
llOwnerSay("===== Fine commenti =====n");
}
}
state leggiOpinione {
state_entry()
{
nomeAvatar = llKey2Name(avatar);
llSetText("Libro degli ospiti occupato a rispondere a "+nomeAvatar,WHITE,1);
llListen( 999, "", avatar, "");
llTextBox(avatar, " scrivi un commento se vuoi entro 30 secondi ", 999 );
llSetTimerEvent(30);
}
timer()
{
llSay(0,"Tempo scaduto");
state default;
}
listen(integer channel, string name, key id, string message)
{
guest += llGetTimestamp()+" " + nomeAvatar + " " + message;
llSay(0,"Inserito il commento");
state default;
}
}