Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Best way to keep the fish from swimming away?

Olympia Rebus
Muse of Chaos
Join date: 22 Feb 2004
Posts: 1,831
07-05-2005 08:57
What's the best way to keep a school of scripted fish from swiming away?
The sandbox setting works fine for testing, but I'm thinking long term.
Should they be encased in a container?


Should they have a "repel" function that's triggered when they stray too far from their playground? (I have a hunch something like this is the best way)

Or should I install anchor objects that attract them to keep them from wandering off?

Or maybe something different?

Pardon my ignorance, and thanks in advance to anyone who responds. :)
_____________________
Rhysling Greenacre
Registered User
Join date: 15 Nov 2003
Posts: 132
07-05-2005 11:32
You could have them remember where they were born, and if they move too far away call llDie()
Surina Skallagrimson
Queen of Amazon Nations
Join date: 19 Jun 2003
Posts: 941
07-06-2005 06:56
From: Rhysling Greenacre
You could have them remember where they were born, and if they move too far away call llDie()


That would prevent them from stray too far, however it would also wipe out the population...

I have two methods.
1) A pre-programed 'home' location with stray distance. This is usefull for confining shoals to very small areas, like 5 - 10 meters from a defined point for whatever reason. For example I program predator fish to "guard" food sources. Once the stray distance is exceded an impulse is applied towards the home location, this turns the fish around and it naturally swims back into the allowed area. Any other fish following it would also turn according to their shoaling instincts. This limitation can be turned off simply by setting the stray distance greater than sim size.
2) Using a fixed food source I discovered by accident that a shoal will stay within a certain range of the food. As individual shoal members get hungry and are attracted back to the food they bring the rest of the shoal with them. Maximum distance is then affected by the size of the shoal, the rate of consumption and amount of food available...
_____________________
--------------------------------------------------------
Surina Skallagrimson
Queen of Amazon Nation
Rizal Sports Mentor

--------------------------------------------------------
Philip Linden: "we are not in the game business."
Adam Savage: "I reject your reality and substitue my own."
Olympia Rebus
Muse of Chaos
Join date: 22 Feb 2004
Posts: 1,831
07-06-2005 08:33
thanks for the ideas, Surina :D

off topic postscript:
have you considered selling pellets of fish "food" for tourists so they could feed the fish? You could make the vendor like a gumball machine. When the visitor pays 3 Linden$ a pellet rezzes. Once the avatar attactches it to his/her hand, the pellet is activated to attract the fish, and vanishes after a few collisions...
_____________________
Johnny Noir
Registered User
Join date: 5 Jan 2004
Posts: 28
07-06-2005 09:53
One [perhaps] interesting idea would be to have your fish check to see if they're too far from the center of the group. Obviously, by nature, they move towards their neighbors but a broader check (i.e. a full 16 nearby fish) would tend to keep them in a somewhat limited sphere. Of course, as the swarm moved collectively, this 'locus' would be moving, so it doesn't keep them locked in place so much as locked together.