# Enemy Movement & AI Patterns > Master Enemy Movement & AI Patterns in Scratch so your games feel responsive, fair, and easy to maintain. Scratch technique guide for Enemy Movement & AI Patterns: variables, frame loop logic, and debugging tips. ## How the mechanism works Build distinct enemy behaviors: patrolling back and forth, chasing when within distance < 150, or firing on a timer. - Prototype this technique in a blank project first so bugs are easy to spot. - Display helper variables (like speed or state) on stage while tuning. - Tune one number at a time until the game feel matches your vision. ## Implementation checklist Use "distance to [Player] < 150" to switch an enemy from calm patrol to active chase. ## Related guides Master Enemy Movement & AI Patterns in Scratch so your games feel responsive, fair, and easy to maintain. - [Project Tutorials](/en/projects/): Combine techniques into complete games. - [Troubleshooting](/en/troubles/): Troubleshoot hitbox, jump, and clone bugs. Updated: 2026-11-22 Author: [Takamasa Suzuki](https://scratch.gmnavi.jp/about/author/) Japanese Edition: https://scratch.gmnavi.jp/techniques/enemies/ [Scratch Daizen (English)](https://scratch.gmnavi.jp/en/)