You can study how "Targeting" works (First, Last, Strongest) and how enemies follow a set path.
Check the script for require() functions that point to unknown IDs.