1.打开插件库:
2.新建,修改,找到源木头,点击保存确定。
3.点击打勾,保存并返回。
4.双击添加的木头,点击局部脚本,删除原来的脚本文件。
5.输入以下代码:
local dropitem=true
local function func(event)
local x,y,z,blockid=event.x,event.y,event.z,event.blockid
local result1,id1=Block:getBlockID(x+1,y,z)
local result2,id2=Block:getBlockID(x-1,y,z)
local result3,id3=Block:getBlockID(x,y+1,z)
local result4,id4=Block:getBlockID(x,y-1,z)
local result5,id5=Block:getBlockID(x,y,z+1)
local result6,id6=Block:getBlockID(x,y,z-1)
if id1==blockid then Block:destroyBlock(x+1,y,z,dropitem) end
if id2==blockid then Block:destroyBlock(x-1,y,z,dropitem) end
if id3==blockid then Block:destroyBlock(x,y+1,z,dropitem) end
if id4==blockid then Block:destroyBlock(x,y-1,z,dropitem) end
if id5==blockid then Block:destroyBlock(x,y,z+1,dropitem) end
if id6==blockid then Block:destroyBlock(x,y,z-1,dropitem) end
end
ScriptSupportEvent:registerEvent('Block.Remove',function(event)
local result, error_string = pcall(func, event)
if result==false then
Chat:sendSystemMsg('#R错误:'..error_string)
error('#R错误:'..error_string)
end
end)
点击保存按钮。
最好保存并返回,进入游戏即可。
在生存玩法下就可以连锁啦。