Summary
Highlights
To build an AI-driven radar system, you will need a rotor, an AI flight block, an AI offensive block, a thruster, an event controller, and a beacon. A control panel is also recommended for interface, and the build can be in small or large grid, with small grid being used in this example.
First, place the rotor, remove its large head, and add a control panel. Then, attach a small rotor head to the rotor. Following this, add the AI flight block, offensive block, thruster, event controller, and finally the beacon. The creator notes this is a basic setup and can be made more visually appealing.
Set the rotor velocity to 5 rounds per minute. In the event controller, set the 'thrust percent' event to 'equal or greater than' 1% and add the atmospheric thruster to selected blocks. For actions, add the beacon and set it to 'toggle on'. Important: initially turn the beacon off so it activates only when an enemy is detected. Name the beacon 'enemy detected'.
For the AI flight block, turn AI behavior on, collision avoidance off, and set the speed limit to 100 m/s. For the AI offensive block, configure target preferences (enemies, neutrals, characters, grid types), set the search frequency to 15 seconds, target the 'weapons subsystem', and set the attack pattern to 'intercept'.
The system works by using the flight block and rotor to orient the thruster towards an enemy. When an enemy is detected, the flight block attempts to move towards it, causing the thruster to activate. The event controller detects this thruster output (greater than 1%) and turns on the beacon, signaling an enemy.
For launching defensive drones, another event controller is needed (or the existing one can be used). The tutorial references a separate video for detailed drone setup but provides a quick rundown for a defensive drone. Record a landing path for the drone using an AI recorder block, creating waypoints that lead to and connect with the drone's docking point.
At the first waypoint (above the connector), configure the AI flight block to have collision avoidance off for landing. Set up a timer block named ‘connect’ to lock the connector, set the battery to recharge, and turn off the drone's offensive block AI behavior. Create another timer block named ‘launch’ to unlock the connector, turn on basic task block AI behavior, take the battery off recharge, and trigger an 'after launch' timer block.
Create a GPS point near the home base, named 'radar base'. On the drone, go to the basic task block, select 'autopilot' objective with 'one way' mode, and add the 'radar base' GPS location to its waypoints. Crucially, set an action on the 'radar base' waypoint for the AI recorder to play its recording. This ensures the drone attempts to return home, but the offensive block takes precedence if an enemy is detected, leading to engagement and subsequent return once the target is nullified.
Ensure the drone's AI flight block has AI behavior on and collision avoidance off initially. In the radar system's second event controller (named 'launching drone'), set the event to 'block on/off' for the 'enemy detected' beacon. For actions, select the 'launch' timer block and trigger it. When the 'enemy detected' beacon activates, it will trigger the drone launch sequence.
The system is tested: an enemy drone causes the beacon to turn on, launching the defensive drone. The drone intercepts the enemy even at 2 kilometers distance, engaging and evading with collision avoidance. After dispatching the enemy, the drone returns to the 'radar base' GPS point, plays its landing recording, and docks.
Various methods can reset the radar; the recommended way involves modifying the event controller for enemy detection. In its actions, select the beacon and set it to 'turn off'. When the offensive block no longer detects an enemy, the AI flight block stops thrusting, causing the beacon to turn off, returning the radar to a neutral state.