next up previous
Next: Interacting with entities - Up: Populations Previous: Populations

An entity can construct a population

An entity can create a population of entities at a given simulation time.

EntityClass ec = lookupEntityClass( "entclass" );
Population p = new PopulationBuilder( "newentities", ec, 1, null );
construct( getLocalTime() + getMinOutputDelay(), p, NullCallback );

The difference between constructing populations from an entity and from the script reader, is that the time and callback must be specified. The time is the local time;. The callback is called when the population has been constructed.



Fred Howell
8/15/1999