Simple Bad Guy

Lesson

Simple Bad Guy

Having bad guys or opponents in a game can make it more challenging and fun so this simple tutorial will go over adding an opponent that moves along a path.

There are two main ways to go about coding this either using change current position with repeat blocks or glide blocks.

The first method using change position and repeat blocks uses a repeat block to move a certain distance in one direction then do the same in the opposite direction.

https://scratch.mit.edu/projects/348406465/editor

The second method is using glide blocks which requires less code, to use this drag out a glide block (shown below) then move the sprite to where you want it to move to and drag out another one and it will have the two positions saved. (Otherwise, you can type in the X and Y positions for where it will go to)

https://scratch.mit.edu/projects/348407041/editor/

Using the movement type you prefer to make it so the dragon follows a path that has a corner in it so it moves across then up and keeps repeating that path like this:

@

Not recently active