Bots Object

See Also Properties Methods Events Model
World
Bots
Bot
Group

The collection of all Bot objects.

Using the Bots Object

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