I have built a ship using support frames that uses 8 engines to move in 4 directions, each pair of engines alternate in moving a piston-like frame inside.
In essence to move in the chosen direction i need to send a redstone signal to one engine, that would push out a frame, which the second engine rests on. then a second later i send a signal to the second engine wich pull the whole ship using the frame as anchor.
It sor of works now with just a timer sending both signals out simultaneously, but as you can imagine it is not too stable or robust.
This is what I have managed to write so far but i keep getting errors once i am past collecting the variables and integers from the user. I never really written anything before and this took me a good 2 hours. Rather than waste another 4 hours writing some clumsy code through trial and error, I was hoping someone could teach me the style of at least the first set of IF loop.
Any tips or ideas on how to handle unexpected inputs or unforseen scenarior are very welcome.
Lastly, due to possible blocks blocking the ship's path it is possible that it will get stuck with the engine's piston being offset? wich would prevent any movement sideways. I need to incorporate a reset command, to do that I simply need to send 2 signals to one engien and 1 signal to the opposing one for each axis (so twice). Perhaps I can just add a "reset" value "direction" string, but then i don't want the interface asking me how many blocks i would like the "reset" to move :P/>/>
term.clear()
textutils.slowPrint("Ship Navigation Interface")
print("Please State Direction")
print("F orward, B ack, L eft, R ight")
print ("use first letters only")
direction = read()
print("")
print("now enter the number of blocks you wish to move")
print("between 1 and 15")
blocks = tonumber(read())
if blocks >15 then blocks = 15
if blocks <1 then blocks = 1
if direction == F then
for 1=1, blocks do
redstone.setBundledOutput("left", colors.blue)
sleep(1)
redstone.setBundledOutput("left", colors.red)
sleep(1)
end
esle print ("oopsie")
Thanks a lot for your help in advance