Game Development Reference
In-Depth Information
Inside the Timer behavior, drag in a Move To behavior, for the horizontal position.
Change it to
scene.Background.Dom.Position.X
, and the vertical to
scene.
Background.Dom.Position.Y
, and the speed to
200
. Now we are going to create
a collision rule so that when the wizard collides with Dominic, he will take off the
screen super fast.
Click on the
Create Rule
button at the top right of the screen, and change it to
Actor
receives event
|
overlaps or collides with actor of type
|
Dom
. When you click on
the last drop-down box, it will show you a list of all the actors you have created. You
can also create tags such as enemies, so you don't have to create behaviors for every
enemy in the game. Instead, you can just tag each actor as an enemy and just have
them colliding with the actor with
tag
|
enemy
. Convenient!
Drag in a Move behavior, set the direction to the upper-right direction of the screen,
and set the speed to something crazy fast, like
300
.