Task 3 - CS2 Bot behavior trees

Task assignment

Implement a custom bot behavior using KeyValues3 (KV3), and the behavior must contain the following requirements:

This behavior should prevent the enemy T team from going to plant the bomb.

Steps to setup

  1. Read the documentation of Bot Behavior Trees
  2. Scripts has to be placed in steamapps/common/Counter-Strike Global Offensive/game/csgo
  3. Create a folder structure if does not exists scripts/ai/task3
  4. In task3 folder create a KV3 file named follow.kv3 and add all of the logic here
  5. To run the file use a CS2 console with following commands:
  1. run map - game_alias custom; game_mode 0; game_type 3;

map de_dust2; mp_roundtime 60; mp_round_restart_delay 0; mp_freezetime 0; mp_team_intro_time 0; mp_warmuptime 0; bot_join_team T;

  1. clear cache - mp_bot_ai_bt_clear_cache
  2. apply the script - mp_bot_ai_bt "scripts/ai/task3/follow.kv3"
  3. kill all bots to apply the AI script - bot_kill

Useful commands

More commands can be found here.


A hint

Focus on the following:

File structure

<!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:generic:version{7412167c-06e9-4698-aff2-e63eb59037e7} -->

{

    config = "scripts/ai/deathmatch/bt_config.kv3"

    root =

    {

        // Your code …

    }

}