# Scratch Mechanic 045: Enemy AI & Pathing — Clone-Safe Version > Practical clone-safe version guide for Enemy AI & Pathing covering patrol loops, line-of-sight, wave patterns, and grid BFS. Deep-dive Scratch game engineering guide #045: Enemy AI & Pathing (Clone-Safe Version) with reusable block architecture. ## Enemy AI & Pathing: Clone-Safe Version Build reliable enemy ai & pathing (patrol loops, line-of-sight, wave patterns, and grid BFS) using the clone-safe version pattern so your project stays responsive and easy to expand. - [All 200 Game Mechanics Guides](/en/mechanics/): Explore all 10 engineering domains. - [Scratch How-To Dictionary (120 Recipes)](/en/howto/): Quick recipes for common coding goals. **Enemy AI & Pathing — Clone-Safe Version** - Initialize Enemy AI & Pathing state cleanly before the main tick loop - Isolate Clone-Safe Version inside a named custom block or dedicated broadcast - Verify edge cases and monitor live variables during playtesting Try it: Reusable enemy ai & pathing behavior ready to drop into any Scratch game via Backpack. Updated: 2026-11-24 Author: [Takamasa Suzuki](https://scratch.gmnavi.jp/about/author/) Japanese Edition: https://scratch.gmnavi.jp/ [Scratch Daizen (English)](https://scratch.gmnavi.jp/en/)