Click to rezz, click again to kill
|
|
Rock Ryder
Registered User
Join date: 6 Oct 2006
Posts: 384
|
03-16-2008 17:06
Hi guys,
I am thinking about producing a script that would sit in a prim. You click it once and an objct in the prim's Contents is rezzed (I think I can handle that); you then click the prim again and the rezzed object dies (not sure about this).
Any thoughts on two problems I am facing here:
1. How to make the left-click on the prim cycle through rezz, kill, rezz, kill....
2. How to kill a rezzed object.
In answering problem (2), imagine also that the rezzed object is Transfer only, no-mod, no-copy. Is there any way to 'kill' the object so that it is returned to the owner's inventory?
Answers on the back of a US$100 bill and send to.....
TIA
Rock
_____________________
If Jimmy cracked corn, and I don't care, why did I write a song about it??
|
|
Haplo Voss
Registered User
Join date: 18 Nov 2006
Posts: 137
|
03-16-2008 19:05
haven't tried this in world, so might wanna check it first... default { state_entry() { llListen (42, "","",""); }
listen (integer channel, string name, key id, string msg) { if (msg == "die") { llDie(); } else return; } }
Place the above script in your object that is rezzed use the following into the prim from which things will be rezzed integer switch = FALSE; default { touch_start(integer touched) { if (switch == FALSE) { llRezObject(whatever the objects name is, vector, rotation, etc.) switch = TRUE; } else if (switch == TRUE) { llSay(42, "die"  ; switch = FALSE; } } } In answer to your last question... No. You cannot rez a no-transfer item from either your own inventory, nor an object with it dissapearing from the inventory of the person it's given to, or the object it's placed in. The only way to repeatedly hand out no-transfer items is via a vendor of some sort. Since it will maintain ownership of you - the creator of it, it can give out as many copies of what is inside of it on your command. someone else / an object not owned by you.. cannot.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
03-16-2008 19:20
depending on your usage you may not even need to make it transferable, for instance, a friend used temp on rez to create a scooter that anyone could use, and it live 1minute or untill there is no seated av, whichever comes last.
now if you made the rezzed object and the rez is intended to be transfered, you could instead set the next owner permisions for no-copy.
_____________________
| | . "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... | - 
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
03-16-2008 19:55
A simple switch for future reference: integer switch = 1;
default { touch_start(integer n) { if (switch) llOwnerSay("do something"); else llOwnerSay("do something else"); switch = !switch; } }
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Rock Vacirca
riches to rags
Join date: 18 Oct 2006
Posts: 1,093
|
03-17-2008 03:18
Many thanks guys for the excellent, simple, switch code, and the llDie solution.
The reason for this script is that I have a rental sim, and I often see tenants go over their prims limits.
When I investigate I sometimes see that they have rezzed a few high-prim objects, some of which are maybe used infrequently.
I want to suggest to the tenants that they use an object rezzer (which i will give to them). So, whenever their slave comes around, and they want to rezz the cage to put them in (I love SL, don't you? LOL), they just click on an 1-prim orb set in the wall and it rezzes the cage for them (or other objects, from a menu of items). When slave departs, they click again and the high-prim cage then dies, ready to be rezzed again at the next visit, thus keeping prims down while objects are not in use. They could just drop the object(s) into the rezzer, then via a menu do a position rezz, position the object, and memorise the position for future rezzes.
I am sure there are commercial rezzers that do just this, but I would like to make my own, and learn along the way.
Rock
|
|
Siannah Ihnen
My script did WHAT?
Join date: 8 May 2007
Posts: 4
|
03-20-2008 03:39
I have a single prim rezzer I call my room in a box, used primarily because I have a low prim count. I store multiple rooms in the box each one configured in a notecard (i.e. each notecard has the object names, positions and rotations of each object in the room). I use commands on a channel rather than touch but basically you unpack a specific room and it positions all the furniture and then you pack it and the furniture is deleted. The delete is achieved by sending a "die" script to the objects that were rezzed. I can send you the scripts, there might be some ideas you could use. Just IM me and let me know if you're interested.
Only problem is as far as I can tell the rez'd objects must be both copy and modify.
Siannah
_____________________
"Wow, I didn't expect the script to do that!"
|
|
Rock Ryder
Registered User
Join date: 6 Oct 2006
Posts: 384
|
03-20-2008 06:37
From: Siannah Ihnen Only problem is as far as I can tell the rez'd objects must be both copy and modify.
Siannah Hi Siannah, I bought a couple of rezzers inworld to have a look at typical features, and the notecards with both rezzers said the same, 'only to be used with objects that have copy permissions'. I then trawled my inventory looking for all the objects that I really wanted the rezzer for, (poseballs, furniture etc) and guess what, none were Copy!! It was a nice idea while it lasted. I suppose if I made all my own furniture, or just used the freebie stuff, rezzers could be useful, but none of the stuff I have bought have Copy permissions, but many thanks anyway. Rock
_____________________
If Jimmy cracked corn, and I don't care, why did I write a song about it??
|
|
Krista Chaffe
Registered User
Join date: 16 Jun 2007
Posts: 96
|
03-20-2008 18:19
llDie():
|