Difference between revisions of "Go transparent when walking"

From Second Life Wiki
Jump to navigation Jump to search
(New page: == A what? == An attachment that goes invisible when you walk and when you stop walking it becomes visible again. I don't know what this could be used for, though. <lsl>//Emmas Seetan ...)
(No difference)

Revision as of 09:17, 21 September 2008

A what?

An attachment that goes invisible when you walk and when you stop walking it becomes visible again. I don't know what this could be used for, though.

<lsl>//Emmas Seetan
//21 September, 16:57

integer WALKING = FALSE; //just a string
default
{
    state_entry()
    {
        
        llSetTimerEvent(1);
    }
    
                
            
        
    
    on_rez(integer sparam){
        WALKING = FALSE;
        llSetTimerEvent(.5);
    }
    
    timer(){
        if(WALKING == FALSE){
            if(llGetAgentInfo(llGetOwner()) & AGENT_WALKING){
                WALKING = TRUE;
                
                 llSetAlpha(0.0,ALL_SIDES); //when you're walking it will go invisible
                
            }
        }
        else{
            if(llGetAgentInfo(llGetOwner()) & AGENT_WALKING){
            }
            else{
                WALKING = FALSE;
                                llSetAlpha(1.0,ALL_SIDES); //when you're not walking it will go visible
                
            }
        }
        
    }
}</lsl>