Skip to content

Enum Module | References

Enums are fixed lists of options recognized by the game engine. They are used to ensure your code provides valid instructions to drones and the game world.


These Enums are used with the player.camera() and player.cameraMode() functions to control what the player sees.

Defines which object the camera is targeting.

PropertyDescription
Enum.Camera.BaseTargets the main farm base.
Enum.Camera.DroneTargets your active drone.
Enum.Camera.PlayerTargets your character.
Enum.Camera.WorldProvides a free-moving world view.

Defines how the camera behaves while following a target.

PropertyDescription
Enum.CameraMode.AttachSticks directly to the target.
Enum.CameraMode.ClassicStandard 3rd person view.
Enum.CameraMode.FixedStationary camera that doesn’t rotate.
Enum.CameraMode.FollowSmoothly follows behind the target.
Enum.CameraMode.StableLocked position for precise observation.

Used with drone.move() to navigate the grid.

  • Enum.Direction.North
  • Enum.Direction.South
  • Enum.Direction.East
  • Enum.Direction.West

Used in UI events to detect mouse behavior.

  • Enum.ClickType.Left
  • Enum.ClickType.Mid
  • Enum.ClickType.Right

Used with drone.plant() and market.buySeed().

  • Enum.Seed.Wheat
  • Enum.Seed.Potato
  • Enum.Seed.Tomato
  • Enum.Seed.Lemon (and all other seeds)

Represents tool types used in the game.

  • Enum.Gear.Watering_Can
  • Enum.Gear.Fertilizer

Used with player.input to detect keyboard presses. This includes all standard keys:

  • Enum.KeyCode.W, A, S, D
  • Enum.KeyCode.E (Interaction)
  • Enum.KeyCode.Space (Jump)
  • Enum.KeyCode.LeftShift (Run)

lau-compiler.exe
-- Set camera to watch the drone in follow mode
player.camera(Enum.Camera.Drone)
player.cameraMode(Enum.CameraMode.Follow)
print("Camera set to Drone")
-- Move drone and plant Wheat
drone.move(Enum.Direction.North)
drone.plant(Enum.Seed.Wheat)
print("Moving North...")
OUTPUT:
Camera set to Drone Moving North...