Hello everyone! Another Scripted Wednesday is here!
We've talked a lot about automating your base, and now it's time to think about defense. When your base expands in various directions, you might not notice enemies sneaking up too close on one side. So today, I want to share a script with you that will add defender bots.
What you'll need:
- Dashbot (or any other bot with a speed of 3 or higher)
- Behavior Controller
- Small Advanced Turret
- Hyper Shield Generator
- Radar (any available)
Setting up the defender bot:
- Create a Dashbot
- Install the Behavior Controller
- Load the Behavior Script
- Once you press PLAY on the Behavior Controller, the bot will request a Small Advanced Turret and Hyper Shield Generator. Make sure you have them available


Keep in mind:
- Dashbots [or other speed 3 bots] may have issues when fighting fast enemy units
- Speed 2 and 1 bots are heavily not recommended due to the focus on kiting of this code
- You can also set up a radar on another bot. The defender bot will respond to the nearest signal to it
- Set the priority radar in P1, and then the defender bot will respond to it first
- P6 - Repair Center, where the defender bot will go for health recovery