游戏达人
  
- 贡献度
- 80
- 金元
- 19007
- 积分
- 2231
- 精华
- 1
- 注册时间
- 2010-11-27
|
陈浩洋 发表于 2013-11-10 11:44 
大神,能不能让收割者不收花啊
你是第二个提出不收花的,好吧,我们优化一下
三十八.收割者(吹排箫一次采集周边所有植物)
用记事本打开游戏目录\data\scripts\prefabs\panflute.lua文件,
1.在下列内容:
local function onfinished(inst)
inst:Remove()
end
的下一行插入以下内容:
function pickfn(inst, picker)
local range = 30
local pos = Vector3(picker.Transform:GetWorldPosition())
local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, range)
for k,v in pairs(ents) do
if v.components.pickable and v.prefab ~= "flower" then
v.components.pickable:Pick(picker)
end
end
return true
end
2.将下列内容:
inst.components.instrument.range = TUNING.PANFLUTE_SLEEPRANGE
inst.components.instrument:SetOnHeardFn(HearPanFlute)
inst:AddComponent("tool")
inst.components.tool:SetAction(ACTIONS.PLAY)
inst:AddComponent("finiteuses")
inst.components.finiteuses:SetMaxUses(TUNING.PANFLUTE_USES)
inst.components.finiteuses:SetUses(TUNING.PANFLUTE_USES)
inst.components.finiteuses:SetOnFinished( onfinished)
inst.components.finiteuses:SetConsumption(ACTIONS.PLAY, 1)
替换为:
inst.components.instrument.onheard = pickfn
inst:AddComponent("tool")
inst.components.tool:SetAction(ACTIONS.PLAY)
即可吹排箫一次采集周边所有植物(除了花),排箫原有催眠功能取消。排箫在魔法选项下用5个芦苇、1个曼德拉草、1个绳子制造。如果觉得曼德拉草不好找,可以按本修改技巧“用便便种曼德拉草”修改一下
|
|