These forums are CLOSED. Please visit the new forums HERE
hiding objects after a set time |
|
|
Kyra Reiter
Registered User
Join date: 13 Dec 2006
Posts: 4
|
03-02-2009 17:50
Is there any way to automatically hide parts of linked set (given they have the script in them) after a setie. Smilar to the hood script that show/hides the hood, but instead o using chat command, use a timer?
|
|
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
|
03-02-2009 18:23
yes you can with:
llSetLinkAlpha( integer linknumber, float alpha, integer face ); from the wiki page: http://wiki.secondlife.com/wiki/LlSetLinkAlpha CODE
_____________________
![]() RAW terrain files - terraform your SIM!! http://www.wishland.info/ PD:the wiki its your friend ![]() http://wiki.secondlife.com/wiki/LSL_Portal |
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
03-02-2009 19:06
you may want to shrink or otherwise move the linked prims as well, if it's likely they'll get in the way of clicks, especially if they have touch to operate mechanisms (nothing more annoying that trying to click one thing and getting another, like wings, tails, or anything large really)
_____________________
|
| . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - |
|
Kyra Reiter
Registered User
Join date: 13 Dec 2006
Posts: 4
|
03-03-2009 16:55
thank you, it works to hide something once touched fo 5 second. But maybe i didnt explain myself very cealy
What i am trying to do is make something disappear from my hand all by itself (with out having to click on it) after a set amount of time. example of it may be used : Your drinking, your glass is full, after a few minutes the prim that makes your glass look full disappears (alpha) making your drink look empty |
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
03-03-2009 17:48
Well, you still have to start the clock somehow. Making the object disappear "after 5 seconds" only makes sense if you say what it's after. The script here is "after you click it." If you want it to be "after you rez it," than put the llSetTimerEvent function in an on_rez event instead. You could start it with a voice command, in which case you put it in a listen event (with an appropriate listen handler in a state_entry event). The idea is the same. You just start the timer with a different trigger.
|
|
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
|
03-03-2009 17:56
thank you, it works to hide something once touched fo 5 second. But maybe i didnt explain myself very cealy What i am trying to do is make something disappear from my hand all by itself (with out having to click on it) after a set amount of time. example of it may be used : Your drinking, your glass is full, after a few minutes the prim that makes your glass look full disappears (alpha) making your drink look empty If you have some experience in scripting, it's still very simple, if you have none, it's still relatively easy to get the hang of. In your example, the glass, you could use the attach(key id) event, along with timer functions, and so on as mentioned before, rather than the touch_start() event. So, something like this: CODE
I used the llSetAlpha() function instead of llSetLinkAlpha() since you seem to want only particular prims to behave this way. If you wanted the option to refill the glass, you could do so with a simple addition to the script, like this: CODE
This second version will cause the prim that the script is in to disappear 5 seconds after being attached, and enable you to make it reappear, with the same 5 second disappearance timer after you say 'refill' on channel 14. I used the attach() event, since wine doesn't drink itself while just sitting around ![]() As said in the post above me, if you want to have it from when it's rezzed, you'd just use the on_rez event, and so on. There are many different events you can choose from for this to work properly. You could even use llFrand() to cause it to disappear after a random amount of time (Even within a set amount of time, such as somewhere between 15 and 30 seconds) _____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL |
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
03-03-2009 20:57
I think the OP might be searching for llDetachFromAvatar(), which requires PERMISSION_ATTACH. See http://www.lslwiki.net/lslwiki/wakka.php?wakka=llDetachFromAvatar
|
|
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
|
03-04-2009 08:03
I think the OP might be searching for llDetachFromAvatar(), which requires PERMISSION_ATTACH. See http://www.lslwiki.net/lslwiki/wakka.php?wakka=llDetachFromAvatar There's another option, too, but I think it was more a just hide thing, judging by the 'Wine disappearing from wine glass' idea. Either way, everything in this thread is useful for one thing or another =D _____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL |