How to make NOT DUMB, but a little bit SMART bots on C3?


Hello world! I recently released my first game on itch and gamejolt! Of course, I expected a different result from the stats. But with renewed vigour I'm going to make my first horror, or rather analogue horror. But I'm not about, you're on the Football Championship game article. Which means I have to tell you, "How to make NOT DUMB, but a little bit SMART bots". Here we are going to look at the behaviour of FOOTBALL players. If you need something else you can ask me for help here. I will answer you: how to teach the bot your way. P.S I am not from Britain or USA, so some items have names in my language, I will translate. P.S.S TUTORIAL HOW TO DO ALSO IN MY GAME!!! IF YOU WANT IT DIFFERENTLY, WRITE HERE

Step 1: Interaction

In our case it will be a football. The bot should attack (pick up the ball) or otherwise interact with us or another object. On your screens is the command:

  • мяч-object to which the bot is travelling (in our case, the ball)
  • ии-object(bot)
  • игрокукрал-a variable that translates to "the player did not take the ball, did not reach the goal" (at will and occasion)
  • ииневзял-variable, which translates to "bot did not take the ball/reached the goal"(at will and occasion)

We tell the game: if the distance between the object and the bot is less than *** pixels (in our case 100) and the player has not reached the target and the bot has not picked up the ball, then interact with it (pick up the ball).

In your case, action=damage, steal, notice, or some other interaction. In football=take the ball.

Step 2: Go after the object

The most standard character feature that everyone should have in my opinion. For a bot to walk towards us, it must have legs and eyes. We add to our object behaviour "Pathfinder" and "Line of sight". And write the following command:

  • ии-object(bot)
  • мяч-object to which the bot is travelling (in our case, the ball)
  • ииневзял-variable, which translates to "bot did not take the ball/reached the goal". (at will and occasion)

What does this command do? It says: if the bot sees the object at point 0 (in short, the ball), and the bot has not reached the goal (take the ball), then find a path to the object

 As a matter of fact, there is nothing like that. Also you can see X<2949. Let me tell you straight away, this is not a necessary condition if you don't care where the object is. Don't forget to put exactly every * second. This way the bot will find its way to the ball without stopping.

Step 3: "Tired of running after you."

If you want to see the bot as a human: make it have a "tiredness" effect. For example, the bot has stolen money and is running away, and you are catching up with it. Then it comes to your rescue:


  • таймер "усталость"-timer tagged "fatigue"
  • ии-object(bot)
  • ииневзял-variable, which translates to "bot did not take the ball/reached the goal". (at will and occasion)
  • игроквзял-a variable that indicates "whether the player reached the goal first (or at all)" (at will and occasion)

For the bot, we are adding a new behaviour "Timer". It will be cyclic. Let me tell you how the command works. The bot is "tired of running" (timer) after the object (variables show us this), its maximum speed decreases from 800 to 500 pixels and the timer stops. When it has rested (2.5 seconds), the timer resumes and the max speed returns to its position.

You can add a stop instead of speed so that a bot with the "Sight" behaviour doesn't see the player. You can also put a regular timer instead of a cyclic timer, but don't forget to add the "enable timer" command. But it is not a problem to insert the command "turn on timer" - you have to think of it.

Step 4: Multiple bots

Oh, yeah, this is gonna be a real B*SM S*X!!! I'VE BEEN STRUGGLING WITH THIS FOR THREE DAYS. Anyway, there are teams like this:

You can see by the name what is responsible for what. But there are some problems. These commands are useless for BOTS, for character (player) selection they are perfect.

All of the commands I have listed currently work for ONE bot. If you have more than one bot, the game and bots will crash. To avoid this, all you need to do is add the COMMAND shown on the screenshot, and move all the commands listed above to that COMMAND. Kind of like sub-commands of a global team.


  • мяч-object to which the bot is travelling (in our case, the ball)
  • выбории-variable that changes depending on the object ID

The last two commands are needed in one case: if you care about which bots to use. If you don't care. You use the first one, without 2 and 3. The first command is mandatory!

P.S. Don't forget to add this command:   Then you will have this system working.

The End

That's it, I've written an article that should help newbies. All of this I have learnt on my own. Tutorials helped me a little bit. If you have any questions, write here or in the comments. I will answer them all. You can also suggest additions to this article.

Also, I'm making a horror game that will interact with the computer, camera, microphone and so on. If you're interested in following me, you can subscribe to me on itch or on gamejolt. Bye!!!

Get Football Championship

Leave a comment

Log in with itch.io to leave a comment.