OC_Scripts/libs/move_script
Andrew Lalis f9f2be629a Updated harvest and added movescript. 2018-09-30 08:17:45 +02:00
..
README.md Updated harvest and added movescript. 2018-09-30 08:17:45 +02:00
movescript.lua Updated harvest and added movescript. 2018-09-30 08:17:45 +02:00

README.md

movescript.lua

A more convenient way to move a robot.

Pastebin

4c2AN8Jw

Module Requirements

None

Instructions

Simply run pastebin get 4c2AN8Jw /home/lib/movescript to install movescript to the local computer. Then you can begin writing movescripts to tell your robots how to move. For example:

local ms = require("movescript")

local my_script = "FFURFFL"
ms.execute(my_script)

The above code will make the robot move forward twice, then up once, then turn right, then move forward twice, and finally turn left.

It is also possible to specify the amount of times to perform an action, by giving an integer value before the character for the movement you want. For example:

local my_long_script = "10D2R5B3U"
ms.execute(my_long_script)