World Cells![]() Region |
A collection of Cell objects.
The Region collection object is used to manipulate a group of Cell objects. Most of the properties and methods of the Cell object are also available to the Region object.
All Cell objects in a Region are also members of the Cells collection object.
The Item method is the default property for the Region object.
The following example creates a Region of Cell objects in the vicinity of a Bot object.
Set NearByCells = Bot.CellHere.Adjacent8
NearByCells.Add Bot.CellHereThe next example creates a Region called "Alive" based on the value of a Tag named "Alive".
Set Alive = New Region
Cells.Tags("Alive").Value =World.Random.Whole(0,1)
For Each Cell in Cells
If Cell.Tags("Alive") = 1 Then Alive.Add Cell
Next Cell
Alive.Color = vbtLightBlue
Alive.Shape.Style3D = vbtSunken