Suki Hirano Posted May 19, 2011 Share Posted May 19, 2011 Does anyone know how to, or can refer me to where I can get info on, script an object so that when it's clicked, it temporarily rezzes an object on another prim? It's mostly used for displaying objects but don't want to crowd the sim with prims. For example I have a wall of pictures, if someone clicks any picture it will rez a model on a display prim in the front. All the pictures on the wall should link to this single display prim. I was trying to tamper with the sculpty browser script as it's essentially the same idea but gave up as it has too many differences lol. Link to comment Share on other sites More sharing options...
PeterCanessa Oh Posted May 19, 2011 Share Posted May 19, 2011 http://wiki.secondlife.com/wiki/PRIM_TEMP_ON_REZ That, or put a timed llDie() in the rezzed object Link to comment Share on other sites More sharing options...
Suki Hirano Posted May 19, 2011 Author Share Posted May 19, 2011 Thanks, I got the rezzing part done, but how do you use the lldie() function? I don't want it to disappear in just one second, but after like a minute or so. And not sure how to use the temp rez function, the wiki page didn't really explain how to use it. And is there any way to limit so that only one model can be rezzed at a time? Multiple clicks results in multiple stacked rezzed objects at this point. Link to comment Share on other sites More sharing options...
Rolig Loon Posted May 19, 2011 Share Posted May 19, 2011 A temp on rez object disappears when the sim's garbage collector makes its next sweep, typically after about 50 seconds. If you want your object to disappear after a specific interval, however, then don't use temp_on_rez. Start a timer in your on_rez event and then put llDie in the timer event so that it's activated when the imer is triggered. To prevent extra objects from being rezzed after the first one, just follow the llRezAtRoot statement in your touch_start event with a command to change state to a new state that does not have a touch* event in it. That way, touch is deativated until you redirect the script back to state default again, presumably once a timer has triggered in the new event. default { touch_end(integer num) { llRezAtRoot("MyObject",llGetPos(),ZERO_VECTOR,ZERO_ROTATION,1); state WaitForIt; } } state WaitForIt { state_entry() { llSetTimerEvent(60.0); } timer() { llSetTimerEvent(0.0); state default; } } Link to comment Share on other sites More sharing options...
Suki Hirano Posted May 19, 2011 Author Share Posted May 19, 2011 Thanks everyone I managed to finish the script. I was wondering if it's possible to have the object displayed in one location, for multiple pictures? In other words link all rezzers to one rezzing location, and limit it so that only one model can be rezzed at a time. (sorry English not my first language, don't know how to describe it lol). [A] [C] [D] [E] _____[ X ]______ A to E are items that are clickable, when clicked I want all their models to rez at X. It is almost exactly like the vendor that home/building creators use at their rezzing sims. Click a picture, and a house rezzes, click another picture, and the first house disappears and a second house rezzes. Thanks. Link to comment Share on other sites More sharing options...
Innula Zenovka Posted May 20, 2011 Share Posted May 20, 2011 There's several ways to do it. The simplest way (I think) is how my business partner and I rez display models in our shops. We've got one big prim, with pictures of all the different products laid on in a grid. The one prim contains copies of all the display models. The script inside uses llDetectedTouchUV (though I suppose we could use llDetectedTouchST, instead) to work out which part of the grid you've touched, and then rezzes the appropriate item. The rezzed object has a timer in, as suggested, to call llDie() after a couple of minutes. The rezzer also remembers the uuid of the last object it's rezzed (which it gets in the object_rez(key id) event) and says that on a very negative channel before it rezzes the next object. The rezzed object has a listener in, listening for its uuid, and if it hears that, it calls llDie(). So we can never have more than one object rezzed by one rezzer. This way we only have to worry about setting one position for things to rez in. If we didn't want to go to the trouble of preparing a special grid, we could use use one linked prim for each image and have the script use llDetectedLinkNumber work out which picture has been touched (but that would mean using a lot more prims). Link to comment Share on other sites More sharing options...
XieNzEn Rage Posted November 4, 2013 Share Posted November 4, 2013 Gee, thank you both for this thread. Been wandering anywhere in SL just to find a temporary rezzer for my breakfast table build. Hahahaha! Well, here's my question: Does the script you posted work on linked objects as well? I mean I wanna rez a breakfast set on a table. Will it work? Link to comment Share on other sites More sharing options...
PeterCanessa Oh Posted November 4, 2013 Share Posted November 4, 2013 An object is an object - it doesn't matter how many prims there are in it. If you can link them into a single object you can rez them as one too. Just remember the object to be rezzed has to be in the parent object's contents, along with the script. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now