Jump to content

kury

Resident
  • Posts

    13
  • Joined

  • Last visited

Posts posted by kury

  1. I have a script that works pendulum continuous mode (touch Start) but I needed it to work only for 5 seconds. Could help?
    The script is this:

    integer swing=FALSE;
    float time=0.3;
    integer steps=12;
    integer swingDegrees = 30;


    integer i=1;
    float swingRad;
    vector normal;

    rotation Inverse(rotation r)
    {
    r.x = -r.x;
    r.y = -r.y;
    r.z = -r.z;
    return r;
    }
    rotation GetParentRot()
    {
    return Inverse(llGetLocalRot())*llGetRot();
    }
    SetLocalRot(rotation z)
    {
    llSetRot(z*Inverse(GetParentRot()));
    }

    default
    {
    state_entry()
    {
    normal = llRot2Euler(llGetRot());
    swingRad=DEG_TO_RAD*swingDegrees;
    llSetTouchText("Swing");
    }
    touch_start(integer num)
    {
    if(swing)
    {
    swing=FALSE;
    llSetTouchText("Swing");
    }
    else
    {
    swing=TRUE;
    llSetTouchText("Stop swing");
    llSetTimerEvent(time);
    }
    }
    timer()
    {
    float stepOffset=(float)i/steps*TWO_PI;
    if(i>steps) i=1;
    if(swing==FALSE && (i==steps || i==steps/2))
    {
    llSetTimerEvent(0.0);
    SetLocalRot(llEuler2Rot(<normal.x, normal.y, normal.z + swingRad*llSin(stepOffset)>));
    } else
    {
    SetLocalRot(llEuler2Rot(<normal.x, normal.y, normal.z + swingRad*llSin(stepOffset)>));
    i++;
    }
    }
    moving_end()
    {
    normal=llRot2Euler(llGetRot());
    }

    }

     

  2. Recentemente adquiri animações (danças) da 3FX mas os scripts de sincronização (versão 1.4) não funcionam e apresentam erro constante. Não estou conseguindo solução junto ao fabricante. Alguem teria um script full perm que faça trabalho semelhante ? Poderiam ceder ?

     

    Obrigado.

  3. Recentemente adquiri animações (danças) da 3FX e os scripts de sincronização não funcionam. O fabricante/vendedor não oferece qualquer suporte e ja vi reclamações semelhantes no SL.

    A unica solução e ver se alguem tem um script de sincronização da 3FX que funcione e que se disponha a cede-lo.

    Obrigado.

  4. Estou tentando adaptar o script de um radar para colocar em um alarme que pertence ao grupo. O radar funciona perfeitamente mas quando doado ao grupo para de funcionar e não me da mais acesso. Podem me ajudar a concertar ?

    O script alarme é o seguinte:

    list visitor_list;

    float range = 96.0;

    float rate = 1.0; 

    integer isNameOnList( string name )
    {
    integer len = llGetListLength( visitor_list );
    integer i;
    for( i = 0; i < len; i++ )
    {
    if( llList2String(visitor_list, i) == name )
    {
    return TRUE;
    }
    }
    return FALSE;
    }
    default
    {
    state_entry()
    {
    llSay(0, "Lista Ativada...");
    llSay(0, "Tecle 'help' para instruções.");
    llSensorRepeat( "", "", AGENT, range, TWO_PI, rate );
    llListen(0, "", llGetOwner(), "");
    }
     sensor( integer number_detected )
    {
    integer i;
    for( i = 0; i < number_detected; i++ )
    {
    if( llDetectedKey( i ) != llGetOwner() )
    {
    string detected_name = llDetectedName( i );
    if( isNameOnList( detected_name ) == FALSE )
    {
    visitor_list += detected_name;
    }
    }
    }
    }
     listen( integer channel, string name, key id, string message )
    {
    if( id != llGetOwner() )
    {
    return;
    }
     if( message == "help" )
    {
    llSay( 0, "O alarme registra o nome de todos os visitantes" );
    llSay( 0, "comes within "+ (string)range + " meters." );
    llSay( 0, "Comandos disponiveis:" );
    llSay( 0, "'help' - Mostra instruções." );
    llSay( 0, "Lista' - Mostra o nome dos visitantes identificados.");
    llSay( 0, "'Reset" - Apaga a lista de visitantes." );
    }
    else
    if( message == "Lista" )
    {
    llSay( 0, "Visitantes:" );
    integer len = llGetListLength( visitor_list );
    integer i;
    for( i = 0; i < len; i++ )
    {
    llSay( 0, llList2String(visitor_list, i) );
    }
    llSay( 0, "Total = " + (string)len );
    }
    else
    if( message == "Reset" )
    {
    visitor_list = llDeleteSubList(visitor_list, 0, llGetListLength(visitor_list));
    llSay( 0, "Lista apagada.");
    }
    }
    }

     

     

×
×
  • Create New...