swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: added agents, and right-button probe


From: Paul Johnson
Subject: Re: added agents, and right-button probe
Date: Mon, 22 Nov 1999 09:49:24 -0600

Daniel Calhoun wrote:
> 
> Since my substantive problem is ethnogenesis, a practical problem follows:
> 
> When I add a new Agent to an AgentList, how do I make sure that it gets
> included in the update and the sensitivity to right-button probe that had
> been established for the original AgentList?
> 
>                   ==================================

In your observer swarm, check where you have the button click sent.  IN
many swarm apps, it is a Grid2d object that receives the message you
indicated in the observer.  The Grid2d only knows where the agents are
if the agents have a command in them that puts them in the grid.  In
heatbugs, it is in the step method, and each bug first puts a nil where
it is, then looks for a new spot, and when it finds one, it tells the
grid something like (I recall) [world putObject: self AtX: x Y: y]. 
When the Grid2d receies the right click at that (x,y), it will check to
see if an agent has registered itself there, and give you the probe,
just as it would for the old agents.

-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]