Difference between revisions of "Go transparent when walking"
Jump to navigation
Jump to search
Emmas Seetan (talk | contribs) (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 ...) |
Emma Krokus (talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
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. | 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. | ||
<source lang="lsl2"> | |||
key owner; | |||
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); | |||
} | |||
} | |||
</source> | |||
Latest revision as of 15:50, 4 May 2015
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.
key owner;
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);
}
}