dimarts, 19 de març del 2019

Pràctiques a Virtual Touch Àlex Ortiz

Hos ensenyare les meves practiques de la 1 a la 4.

La primera imatge es de la meva parcela tal com la tinc.
  
P1:Es un regal que vam, fer per Nadal.

default
{
    touch_start(integer total_number)
    {
        llLoadURL(llDetectedKey(0), "FELICITACIO REGAL 2018", "https://studio.code.org/projects/applab/TvHzlhDSOzLbORl8gdGPfFSEwTCoIgm6hjLoiV9opHQ");
    }
}

P2:El nostre cartell de parcela.

// Aquest és un Script que entrega una nota en clicar sobre un objecte
// Heu d'afegir la nota dins de l'objecte a la pestanya de CONTINGUTS
// Heu de substituir el nom de la nota nom_nota que voleu entregar pel nom de la vostra nota P2_CartellNota

default
{
    touch_start(integer total_number)
    {
        llGiveInventory(llDetectedKey(0), "P2_CartellNota");
    }
}
P3:El nostre personatge que ens teleporta a una torre.

// Put me in a prim, adjust the vector destination. On click "teleport" in pie, avatar will be teleported to destination.

// Retrieved from Free SL Scripts on http://www.gendersquare.org/sl
// Author: unknown

key lastAVkey = NULL_KEY;
string fltText = "TORNAR (TP botó dret)";
vector dest = <93,46,93>; // X Y Z coordinates

init()
{
        llSetSitText("Teleport");
        llSetText(fltText, <1,1,1>, 1);
        llSitTarget(dest-llGetPos(), <0,0,0,1>);
}

default
{
    state_entry()
    {
                init();
    }
    touch_start(integer i)
    {
        init();
    }
    changed(integer change)
    {
        key currentAVkey = llAvatarOnSitTarget();
        if (currentAVkey != NULL_KEY && lastAVkey == NULL_KEY)
        {
            lastAVkey = currentAVkey;        
            if (!(llGetPermissions() & PERMISSION_TRIGGER_ANIMATION))  
                llRequestPermissions(currentAVkey,PERMISSION_TRIGGER_ANIMATION);
            llSleep(0.5);
            llUnSit(currentAVkey);
            llStopAnimation("sit");
            llResetScript();
        }
    }
}
P4:Es la nostra bruixola.

default
{
    state_entry()
    {
       llTargetOmega(<0,0,1>,-10,1.0);
    }

}

Cap comentari:

Publica un comentari a l'entrada