Re: "watching a selection" and "creating a second worldCenter"

jon klein <[email protected]>
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
On Jan 31, 2004, at 6:49 PM, Eric Leshinsky wrote:

> I am trying to get the camera to watch a selected
> mobile agent along with showing the neighbor lines,
> but it doesnt seem to like the watch command from the
> click on selection Method. Any ideas?

The following works for me:

	+ to click on item (object):
		if selection: selection hide-neighbor-lines.
		if item: item show-neighbor-lines.

		selection = item.
		super click on item.
		self watch item item.

> we are trying to create a second worldCenter because
> we have set up two different swarms and would like to
> see them operate in two different orbits (with some
> overflow interractions). It seems that only having one
> worldCenter is inhibiting us. any ideas?

If you look at the Swarm demo, you'll see that the world
center urge is calculated like this:

if |(self get-location)| > 10: worldCenterUrge = -(self get-location).

So if the agent is at (X, Y, Z), it's getting an urge to
go back towards (-X, -Y, -Z) -- an urge that directs it
to the center of the world, (0, 0, 0).

If you want the center of the world to be something other
than (0, 0, 0), you would assign the center urge like
this:

worldCenterUrge = myWorldCenter - (self get-location).

And there's no reason that different agents couldn't have
different values for myWorldCenter.

_______________________________________________
breve mailing list
[email protected]
http://www.spiderland.org/mailman/listinfo/breve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.