0
我最近试过这个代码,用于检测诸如沙砾或小怪的东西,但是当我把它与我的脚本的其余部分混淆起来,整个事情和我看不出为什么。我遇到了垃圾/砾石/沙子检测代码问题
我想加入到我的脚本代码:
local function moveForward()
while not turtle.forward() do
if turtle.detect() then
turtle.dig()
turtle.attack()
if turtle.detect() then
sleep(0.2)
end
end
end
end
见这一局部功能。
看到我的working script没有这个功能。
任何帮助将不胜感激。
你确定你想**嵌套'如果turtle.detect()then'块? – hjpotter92
我不敢肯定我只是试过这个,它搞砸了龟的模式。我只是需要一些东西,如果一个暴民走过身边的id沙/ gravvle下降面前解决问题,并恢复其进展 – SubTox1c
“它搞砸了”告诉我们什么也没有。 – Mud