Skip to content

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.


Unlike the standard drone.move() which only moves one tile at a time, V2 hardware allows for direct navigation to specific coordinates.

FunctionInputDescription
droneV2.goto(x, z)number, numberTeleports the drone to navigate directly to the specified coordinates.
-- Instantly return to the center of the map
droneV2.goto(0, 0)
player.sent("Drone has returned to charging station.")

Locking prevents the drone from moving. This is useful for “parking” your drone while you edit scripts or during specific weather events.

FunctionReturnsDescription
droneV2.lock()voidDisables all drone movement.
droneV2.unlock()voidRe-enables drone movement.
droneV2.isLocked()booleanReturns true if the drone is currently locked.
lau-compiler.exe
if not droneV2.isLocked() then
droneV2.lock()
print("Status: Movement Locked")
end
OUTPUT:
Status: Movement Locked

The V2 module introduces the ability to physically shift crops across your field without destroying them.

FunctionInputDescription
droneV2.swap(dir)Enum.DirectionShifts the crop currently beneath the drone one tile in the specified direction.

These functions trigger mechanical animations and visual effects.

FunctionDescription
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 coordinate
droneV2.goto(13, -13)
-- Lock drone for safe processing
droneV2.lock()
if drone.canCrop() then
drone.crop()
droneV2.doSpin() -- Celebrate the harvest
end
-- Unlock and return
droneV2.unlock()
droneV2.goto(0, 0)