Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llRezObject and inventory recursion

Highlander Thereian
Junior Member
Join date: 2 Jun 2004
Posts: 1
06-24-2004 01:51
Hello everyone.

I have an object "Object" bit of code that uses llRezObject. The obect that is rezzed is an exact copy of "Ojbect". That being the case I would expect that tne newly rezzed object would have an "Object" in its inventory.

Does anyone have any knowledge of why this would be? Here is a summary incase the origina explaination was unclear.

Summary
=======

Object
- Contents
- SelfReplicatingScript
- Object

When SelfReplicatingScript llRezObject's Object, I would expect the same contents as above, but Object is missing from the inventory...

Object
- Contents
- SelfReplicatingScript
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
06-24-2004 03:07
Ok, lets go through this slowly:
1 - you have a box with a script and no other box inside it.

You make a copy of it and put it inside itself

2 - you have a box with a script that does have a box inside it, containing a script but no other box.

So you take out the box and put another box inside it, and put it inside the original box.

3 - you have a box with a script that does have a box inside it, containing a box with a script but no other box inside it.

See the problem? You will eventually get to a boxless box so to speak :)

Now, if you want to do recursive rezzing, self-replicating objects or something like that, the right way to do it is to use llGiveInventory to give a copy of the item to be rezzed from the parent to the child.
In order to achieve this, just use an object_rez event.

CODE

object_rez(key child)
{
llGiveInventory(child, llKey2Name(child));
}
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
03-05-2005 07:26
object_rez is the correct link
nonnux white
NN Dez!gns
Join date: 8 Oct 2004
Posts: 90
Passing a Script inside the child rezzed prim
07-03-2005 10:15
after passing an Active script into the new rezzed object, the script turns Inactive!

is there a way to activate it?

i know how to activate it in the inventory, but is there a way to do it automatically??

thx in advance
_____________________
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
07-03-2005 10:33
llSetRemoteScriptAccessPin()
llRemoteLoadScriptPin()
_____________________
Olmy Seraph
Valued Member
Join date: 1 Nov 2004
Posts: 502
07-03-2005 14:10
I just wanted to say that while these discussions are good to have and recursive rezzing is useful in theory, self-replicating objects can be very dangerous if you don't take some precautions. If you're not careful they can get out of control and crash sims or get you banned. While you're experimenting it's a good idea to put something in the script that will call llDie() after a certain amount of time or if your avatar isn't around. This may seem like excessive caution, but you'll be glad you did it.
_____________________
Some people are like Slinkies... not really good for anything, but they sure bring a smile to your face when you push them down the stairs.
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
07-03-2005 14:14
From: Eep Quirk
object_rez is the correct link

You don't say :P
That post is from 2004, when the wiki was hosted on an external site.
Burke Prefect
Cafe Owner, Superhero
Join date: 29 Oct 2004
Posts: 2,785
07-03-2005 14:24
Av hunterkiller drones that lock onto every avatar except me and force them off the sim.
I forgot to enable the code that kills them after a minute.
The spawned....
made it out of the starting sim (forgot DIE AT EDGE)....
They weren't around when the grid came back online a few hours later, so I just whistled and walked away, attaching my Innocence Halo as I went.
nonnux white
NN Dez!gns
Join date: 8 Oct 2004
Posts: 90
i understand the danger!
07-03-2005 18:54
i know we can build a virus like with this tools :)

i could just build the prim, with the script inside, and then place it inside the rezzer.
but each time u want to change this secondary script, u need to drop this object, do the change, erase the existing one inside the rezzer, and place this new updated one. i am too lazzy! :)

i never used this functions before, i prefer to learn then to do mechanical work :]

i took every precaution to avoid crashing the same! this function is used in another silent construction. i am building games. the main goal is avoid sensors, listenners and any "lag" related functions.

thx all!
_____________________
Stefan Nilsson
Registered User
Join date: 14 May 2005
Posts: 8
07-16-2005 03:37
There is now an ExampleSelfReplication on the LSL wiki.
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
07-16-2005 17:57
From: Eggy Lippmann
You don't say :P
That post is from 2004, when the wiki was hosted on an external site.


Yea, well, fix your link(s) then...