Difference between revisions of "Talk:Go transparent when walking"

From Second Life Wiki
Jump to navigation Jump to search
m
 
Line 4: Line 4:


'''Go transparent when walking'''
'''Go transparent when walking'''
 
<source lang="lsl2">
key owner;//instead of key owner  = llGetOwner();
key owner;//instead of key owner  = llGetOwner();
   
   
Line 36: Line 36:
     }
     }
}
}
</source>

Latest revision as of 22:08, 4 May 2015

(has also been corrected on main page

There is an error in this script - this is the corrected version:

Go transparent when walking

key owner;//instead of key owner  = llGetOwner();
 
default
{
    on_rez(integer start_param)
    {
        llResetScript();
    }
 
    changed(integer change)
    {
        if (change & (CHANGED_OWNER | CHANGED_INVENTORY))
            llResetScript();
    }
 
    state_entry()
    {
        owner = llGetOwner();
        llSetTimerEvent(1.0);
    }
 
    timer()
    {
        integer ownerInfo = llGetAgentInfo(owner);
 
        if(ownerInfo & AGENT_WALKING)
            llSetAlpha((float)FALSE, ALL_SIDES);
        else
            llSetAlpha((float)TRUE, ALL_SIDES);
    }
}