Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Problem with an object duplicating itself

Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
12-04-2005 22:15
I'm working with A-life and I'm having trouble with objects duplicating themselves.

In a nut shell:

I need a fish to spawn a copy of it's self so I put a copy of the fish in the fish. to make things simpler, we'll call the original fish fish1, the fish inside fish1 fish2, and the fish inside fish2 fish3


I spawn fish1, (no copy inside yet.) I put a copy of the fish (fish2) inside fish1
now Fish 1 is stuffed with a copy of itself (fish2) but fish2 still doesn't have a copy of itself inside of it.
so I spawn another fish and stuff it. now fish 1 has a copy of itself (fish2) which also has a copy of itself (fish3)


what's my problem? lets unstuff the fish.

I pull a fish out of fish1. good
I pull a fish out of fish2, okay
I pull a fish out of fish3. check
I pull a fish out of fish4, (err... I *do* want infinite fish to be generated so this is expected)
I pull a fish out of fish5. all's good
I *can't* pull a fish out of fish 6 because there is no fish 6.

what's going on here that I missed? (aside from Dr. Zeuss's nursery rhyme)

[edit] is it possible for a prim to give it's inventory to another prim? and if so, what would be a good way to do that? [/edit]
_____________________
My SLExchange shop

Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not.


The function is working perfectly fine. It's just not working the way you wanted it to work.
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
12-04-2005 22:23
From: Senuka Harbinger

[edit] is it possible for a prim to give it's inventory to another prim? and if so, what would be a good way to do that? [/edit]

llGiveInventory and llAllowInventoryDrop

You may also want to see this, LINK
_____________________
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
12-05-2005 10:30
For the love of the grid, be CAREFUL with this. This is how the grid got taken down last month... if you believe them, that was an accident. I have no doubt that this kind of thing, if not done extremely carefully, can result in an accidental run-away replication scenario.
DoctorMike Soothsayer
He's not a real doctor.
Join date: 3 Oct 2005
Posts: 113
Lol
12-06-2005 06:42
Hi Senuka,

You know the answer now, hopefully, but I laughed for about 5 minutes thinking of you packing fish inside fish inside fish....

It really cheered me up, but I should apologise. Anyway, on a positive note, there is an Artificial Life forum and SL group for just this stuff. If you have problems with the scripting - especially to prevent grey goo! - then there is a good place to ask.

Mike
_____________________
Performance Artist and educator
"Thinking outside the Prim"