Jump to content

Kokiron

Resident
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Kokiron

  1. 4 hours ago, Nova Convair said:

    With advanced lighting on the number of light sources is not limited.

    Projector lights don't work with alpha blend textures. Depending on distance, angle, colour, whatever you get things looking too bright or too dark or in teh wrong colour. Try point lights or alpha mask textures (which is probably not an option)

    Need to add that I have switched off attached lights, so whatever you do - I will never see it - I will see you in the dark with shadows. So don't expect that everybody will see you enlighted. 😎

    hehe, I was only using them for screenshots, I never wear them all the time. I'll have to get point lights

  2. so last night I noticed that, for whatever reason, light (be it a face light or another object with the light feature toggled on) isn't showing at all on my head, ears, hair, and tail. This only happens when their textures are set to alpha blending, but setting them to anything else messes up the textures. If I edit the object with light enabled, THEN it shows properly on head/ears/hair/tail until I close the edit menu. It's something to do with the objects or SL because it literally stops working right at the seam between head and body. I'm including some images showing what it should look like (taken from edit mode) and what's actually happening. Anyone know whats up?

    download.png

    download (1).png

    download (2).png

  3. I've got a script for a dancer, but I'm not sure how to get it to loop back to the beginning once it plays the last sound. Can anyone help?

    string ANIMATION = "hold";   // put here name of your animation
    float SOUND_LENGTH = 9.12;             // put here length of your sound
    float SOUND_VOLUME = 1.0;               // puth here volume (1.0 = max )
    
    integer numNames = 0;
    integer playing = FALSE;
    integer actNum = 0;
    
    playSound( integer stat )
    {
        if ( stat == TRUE ){
            actNum = 0;
            llPreloadSound( llGetInventoryName( INVENTORY_SOUND, actNum ) );
            playing = TRUE;
            llSetTimerEvent( 1.0 );
            if ( ANIMATION != "" ) {
                llSleep( 1.0 );
                llStartAnimation( ANIMATION );
            }
        }
        else {
            playing = FALSE;
            llStopSound();
            llSetTimerEvent( 0.0 );
            if ( ANIMATION != "" ) {
                llStopAnimation( ANIMATION );
            }
    
        }
      
    }   // End playSound( integer stat )
    
    
    // ------------------------------------------------------------
    // ------------------------------------------------------------
    
    default
    {
        on_rez( integer num )
        {
            llResetScript();
        }
        state_entry()
        {
            llRequestPermissions( llGetOwner(), PERMISSION_TRIGGER_ANIMATION );
        }   // End state_entry()
    
    
        run_time_permissions(integer perm)
        {
            if ( perm & PERMISSION_TRIGGER_ANIMATION ) {
                numNames = llGetInventoryNumber( INVENTORY_SOUND );
                if ( numNames > 0 ){
                    llOwnerSay(" Commands 'smangon' or 'smangoff'");
                    llListen( PUBLIC_CHANNEL, "", "", "" );
                }
                else {
                    llOwnerSay( "Any sound in the inventory!" );                
                }
            }
            else {
                llRequestPermissions( llGetOwner(), PERMISSION_TRIGGER_ANIMATION );
            }
        }   // End run_time_permissions(integer perm)
    
    
        attach(key attached)
        {
            if ( attached != NULL_KEY ){
                llResetScript();
            }
        }   // End attach(key attached)
    
    
        listen(integer channel, string name, key id, string message)
        {
            message = llToLower( message );
            if( ( message == "smangon" ) && ( playing == FALSE ) ) {
                playSound( TRUE );
            }
            else if( ( message == "smangoff" ) && ( playing == TRUE ) ) {
                playSound( FALSE );
            }
        }   // End listen(integer channel, string name, key id, string message)
    
    
        timer()
        {
            if ( playing == TRUE ) {
                llSetTimerEvent( SOUND_LENGTH );
                if ( actNum == numNames ) {
                    actNum = 0;
                    llSetTimerEvent( 0.2 );
                }
                else {
                    if ( actNum>0) {
                        llStopSound();
                    }
                    llPlaySound( llGetInventoryName( INVENTORY_SOUND, actNum ), SOUND_VOLUME );
                    ++actNum;
                    if ( actNum < (numNames - 1))
                    {
                        llPreloadSound( llGetInventoryName( INVENTORY_SOUND, actNum ) );
                    }
                     if ( actNum == numNames)
                    {
                        playing = FALSE;
                        llSleep( 1.5 );
                        llStopAnimation( ANIMATION );
                    }
                    
                }
               
            }
            else 
            {
                actNum = 0;
                llStopSound();
              if ( ANIMATION != "" ) 
              {
                 llStopAnimation( ANIMATION );
                }
                llSetTimerEvent( 0.0 );
            }
            
            
        }   // End timer()
        
    }   // End state default
    
    // ------------------------------------------------------------
    // ------------------------------------------------------------
×
×
  • Create New...