Profile image

Part 1: How to make a MDCU [BETA]

5,379 Someguywhomakesmods  3 days ago

1. Setup Your Plane

  • Start by building or modifying a plane that can be controlled and can perform autonomous actions.
  • Make sure to equip it with the necessary control surfaces, engines, and autopilot components.

2. Adding Waypoints

  • Use the Waypoint block in SimplePlanes to define the points that the plane will navigate to.
  • You can add multiple waypoints, each specifying a position that the plane should aim for.
  • To do this:

    • Go to the Parts menu.

    • Add a Waypoint block (you can find it under the "Control" section).

    • Place the waypoint in the world (where you want the plane to go).

3. Scripting Waypoint Navigation

  • SimplePlanes allows you to write custom logic using XML or In-Game Logic blocks. You will need to write a script that makes the plane automatically follow the waypoints.
  • You can use logic like:

    • "Waypoint Follow" Logic: This logic will calculate the direction and altitude for each waypoint and adjust the plane’s course to fly towards it.

    • Time-based or Distance-based Actions: Set actions for the plane to change direction or altitude when a specific distance to the waypoint is reached.

4. Using Autopilot and Logic Blocks

  • Add an Autopilot module to your plane to manage its flight path automatically.
  • Use Logic gates to connect your waypoints and autopilot systems.

    • Example: If the plane is close to a waypoint, switch to the next waypoint.

5. Fine-Tuning

  • Fine-tune the plane’s autopilot settings, such as its speed, altitude, and turning radius, to ensure smooth transitions between waypoints.
  • You can also use Triggers to activate certain behaviors once a waypoint is reached, like activating a camera, releasing objects, or triggering other events.

6. Test and Adjust

  • After setting up the waypoints and scripting the plane's autopilot, you will need to test and refine.
  • Adjust the waypoint distances, autopilot sensitivity, and any other components to ensure the plane follows the path as intended.

Tools and Features to Use:

  • Waypoint Blocks: Set the locations you want to navigate to.
  • Logic Blocks: Control the flow of navigation and actions.
  • Autopilot: Automate the plane’s behavior.
  • Triggers: Trigger events after reaching certain waypoints.
  • Engines and Controls: Ensure you have the right engine power and controls to manage the flight.

Example Code Snippet (Hypothetical):

```xml
<Part>
<name>Waypoint1</name>
<Position x="100" y="500" z="200"/>

</Part>

<Part>
<name>Waypoint2</name>
<Position x="500" y="500" z="300"/>
</Part>

<Autopilot>
<Activate>True</Activate>
<WaypointFollow>True</WaypointFollow>
</Autopilot>
```

This is a basic setup where you define two waypoints, and the autopilot logic follows them sequentially. You’d have to customize it further based on your specific plane and desired behavior.

Further Steps:

  1. Advanced Scripting: If you want to make the system more sophisticated (like adding dynamic waypoint generation or real-time adjustments), you can dive deeper into the game’s scripting capabilities.
  2. User Interface: Consider adding a display for the user to see which waypoint is next, or a way to manually adjust waypoints in-flight.

    This is is just the overview of the maths included in the variable of the UTC-coordinates .