第180页:芦苇吹出催眠曲
展开一八零.芦苇吹出催眠曲(在携带的芦苇上按鼠标右键,可催眠怪物)
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\cutreeds.lua文件,在inst:AddComponent("inventoryitem")的下一行插入以下内容:
inst:AddTag("flute")
local function HearPanFlute(inst, musician, instrument)
if inst.components.sleeper then
inst.components.sleeper:AddSleepiness(10, TUNING.PANFLUTE_SLEEPTIME*1)
end
end
inst:AddComponent("tool")
inst.components.tool:SetAction(ACTIONS.PLAY)
inst:AddComponent("instrument")
inst.components.instrument.range = TUNING.PANFLUTE_SLEEPRANGE*2
inst.components.instrument:SetOnHeardFn(HearPanFlute)
即可在携带的芦苇上按鼠标右键,可催眠一片怪物。其中*1为催眠时间20秒,想催眠60秒就*3即可。其中*2为催眠范围30格,想扩大至60格就*4即可
更多相关内容请关注:饥荒专区
责任编辑:Shy夏夏