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.
Author: Almaravarion
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
Now you need to set up the Radars. Install any Radar (like Scout Radar) in any building around the perimeter of your base, where you expect enemy attacks.
Set the "Search Filter" to "Enemy" as shown in the screenshot
Connect the RADAR RESULT socket and the SIGNAL socket, as shown in the screenshot below
Now, as soon as the radar detects an "Enemy" within its range, it will signal the defender bot, who will come to participate in the battle.
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
Behavior Script:
*** I hope this script helps you set up your base. If you have any questions, please write them in the comments. Also, don't forget to check out our previous script issues, as there are many interesting solutions from players!https://store.steampowered.com/news/app/1450900/view/7217647935765867440
https://store.steampowered.com/news/app/1450900/view/3871471412481250750
https://store.steampowered.com/news/app/1450900/view/3889485345748521475
https://store.steampowered.com/news/app/1450900/view/3888358641555101802
https://store.steampowered.com/news/app/1450900/view/3888358641540447700
https://store.steampowered.com/news/app/1450900/view/3855706911137657433
https://store.steampowered.com/news/app/1450900/view/3855706911119612650
https://store.steampowered.com/news/app/1450900/view/3855706185309757803
https://store.steampowered.com/news/app/1450900/view/3855706185299872234
https://store.steampowered.com/news/app/1450900/view/3808417211633108188
https://store.steampowered.com/news/app/1450900/view/3794905774846967399
https://store.steampowered.com/app/1450900/Desynced_Autonomous_Colony_Simulator/