Jump to content

Temporary rezzing script?


Suki Hirano
 Share

You are about to reply to a thread that has been inactive for 3250 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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

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

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

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

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

  • 2 years later...

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

You are about to reply to a thread that has been inactive for 3250 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...