O'Reilly logo

Alice 3 Cookbook by Vanesa S. Olsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with many instances of the same class

In this task, we will make four instances of the MyHawk class run a race. We will add four instances of the MyHawk class to an array and then we will use this array to set the speed value for each instance and to run many statements at the same time.

Getting ready

We will use an existing project that has an instance of the MyHawk class, provides a Step property and defines a flyStep procedure. Follow these steps to add three new instances of the MyHawk class:

  1. Open the project saved in the Using properties to call procedures recipe.
  2. Click on Edit Scene, at the lower-right corner of the scene preview. Alice will show a bigger preview of the scene and will display the Model Gallery at the bottom.
  3. Right-click ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required