Go transparent when walking

From Second Life Wiki

Second Life Wiki > Go transparent when walking
Jump to: navigation, search

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.

//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
 
             }
         }
 
     }
 }