The Enemy Character Following the Hero

The Enemy Character Following the Hero

Video - The Enemy Character Following the Hero


Video Transcript

Good evening!

This lesson, consisting of 3 parts, is the last for the game "Banana Hunt".

If you've followed Steve's and the experts’ instructions, you are very close finishing this game.

By ending the game, invite your friends to play it and suggest you ways to improve it.

With the knowledge you have acquired from the process of creating the game you can change it enough in order for it to become our own unique game.

Before making your personal changes you should watch Stevie and the experts very carefully as in the 3 parts of this lesson they will present very important information.

Your absolute concentration is required.

In these 3 parts of this lesson, Stevie will speak to you from his office.

Stevie you can start..

 

Good evening!

We've gone a long way in creating our first game.

It has already the desired structure and runs quite well.

But there are more things to be done.

First of all, let's remember with a video what we have done so far.

We will watch the video in fast forward and its purpose is to remind us of our actions so far.

Let’s watch it...

Very nice.

We have already created a lion that prevents us from reaching our goal. Let's create the 2nd.

The 2nd lion will have a similar scenario with the 1st one. It will just move on a different route.

So the monkey’s actions will be even more difficult.

We will create the 2nd lion in a way that is the same to the 1st one and then we can make small changes to the script, the process is simple, easy and fast.

From the object area,   right click (ctrl + click if you have Mac PC) on the 1st lion and choose "duplicate".

The 2nd lion is created. Its name is Lion2. We do not have to change it.

In exactly the same way we create the 3rd Lion.

Let's try our game now.

You can see the three lions moving almost together to the same direction.

We will change the direction of both the 2nd and 3rd lions.

In the second lion's scenario, let's change the direction that the object starts at 15 and the 3rd at -15.

Let me now try my game...

I see that it is getting difficult. We will improve it later.

Let's play my game again. I will make two observations.

The first observation is that the lions are moving very fast. Let's see it again.

Yes. To reduce their speed, we can change the number of the steps.

I will change the 2nd lion’s steps from 10 to 2 and the 3rd lion’s from 10 to 6. Let's see the result.

It is better now. Don’t forget to make your own game and save the settings you like.

However, I suggest you to keep the settings I suggested and make changes at the end according to your own preferences.

My second observation is that the three lions follow their own path.

No one is following the monkey.

Don’t forget that the main goal of our game is that the lions are hunting the monkey to eat it.

Let's change the direction of the second lion to follow the monkey.

In this scenario, for the entire duration of the game, just before moving, let's set it to change its direction depending on where the monkey is.

The command block we need is in the pallet “motion” and is called "point towards the monkey".

Let's see what we have done so far...

It's good. I think we need to improve it further, though.