DroneV2 Module
The droneV2 module is a specialized expansion of the standard drone controls. It is designed for complex automation tasks that require direct coordinate access and mechanical state management.
🚀 Advanced Navigation
Section titled “🚀 Advanced Navigation”Unlike the standard drone.move() which only moves one tile at a time, V2 hardware allows for direct navigation to specific coordinates.
| Function | Input | Description |
|---|---|---|
droneV2.goto(x, z) | number, number | Teleports the drone to navigate directly to the specified coordinates. |
Example: Returning to Base
Section titled “Example: Returning to Base”-- Instantly return to the center of the mapdroneV2.goto(0, 0)player.sent("Drone has returned to charging station.")🔒 Mechanical Locking
Section titled “🔒 Mechanical Locking”Locking prevents the drone from moving. This is useful for “parking” your drone while you edit scripts or during specific weather events.
| Function | Returns | Description |
|---|---|---|
droneV2.lock() | void | Disables all drone movement. |
droneV2.unlock() | void | Re-enables drone movement. |
droneV2.isLocked() | boolean | Returns true if the drone is currently locked. |
lau-compiler.exe
if not droneV2.isLocked() then droneV2.lock() print("Status: Movement Locked")endOUTPUT:
Status: Movement Locked
🔄 Crop Manipulation
Section titled “🔄 Crop Manipulation”The V2 module introduces the ability to physically shift crops across your field without destroying them.
| Function | Input | Description |
|---|---|---|
droneV2.swap(dir) | Enum.Direction | Shifts the crop currently beneath the drone one tile in the specified direction. |
✨ Animations & Effects
Section titled “✨ Animations & Effects”These functions trigger mechanical animations and visual effects.
| Function | Description |
|---|---|
droneV2.doBig() | Plays an animation that temporarily enlarges the drone. |
droneV2.doSpin() | Causes the drone to perform a rapid 360-degree spin. |
droneV2.doWobble() | Triggers a “wobble” or “shiver” animation. |
💡 Practical Example: The Grid-Safe Harvester
Section titled “💡 Practical Example: The Grid-Safe Harvester”This script uses V2 locking to ensure the drone doesn’t move while the player is checking the inventory.
-- Navigate to a specific high-value coordinatedroneV2.goto(13, -13)
-- Lock drone for safe processingdroneV2.lock()
if drone.canCrop() then drone.crop() droneV2.doSpin() -- Celebrate the harvestend
-- Unlock and returndroneV2.unlock()droneV2.goto(0, 0)