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

Moving an actor

In this task, we will learn to add code to animate the movement of an actor through a scene. We will call a procedure and we will pass parameters to this procedure to specify the desired movement, the duration, and the animation's style.

Getting ready

We have to be working on a project with at least one actor. Therefore, we will use an existing project that has a rabbit.

  1. Open the project saved in the Setting initial properties for an actor recipe in this chapter.
  2. Click on Edit Code, at the lower-right corner of the big scene preview. Alice will show a smaller preview of the scene and will display the Code Editor on a panel located at the right-hand side of the main window.
  3. Click on the class: MyScene drop-down list and the list of classes ...

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