Bots Property

See Also Applies To Example Model

Returns the Bots collection object.

Remarks

The Bots collection object can be used to manipulate all Bot objects through the use of its properties and methods.

The Item method is the default property for the Bots object.

Example

The following example randomly moves all Bot objects in the Bots collection and changes their color to red when they are located on the left side of the display area and to blue when they are on the right side.

Bots.TurnRand -15, 15 
Bots.Step
For Each Bot in Bots
   If Bot.X < World.Screen.Center.X Then
      Bot.Color = vbtRed
   Else
      Bot.Color = vbtBlue
   End If
Next Bot