第237页:节日礼花
展开二三七.节日礼花(点燃荧光果放礼花)
用记事本打开游戏目录\data\scripts\prefabs\lightbulb.lua文件,在inst:AddComponent("inventoryitem")的下一行插入以下内容:
local function OnIgniteFn(inst)
GetPlayer().SoundEmitter:PlaySound("dontstarve/common/blackpowder_explo")
inst:DoTaskInTime(1.5, function() inst.Physics:SetMotorVelOverride(0,42,0) end)
end
local function OnExplodeFn(inst)
GetPlayer().components.sanity:DoDelta(5)
inst:StartThread(function()
for k = 1,3 do
GetPlayer().SoundEmitter:PlaySound("dontstarve/creatures/eyeballturret/shotexplo")
TheCamera:Shake("FULL", 0.3, 0.02, .5, 40)
Sleep(.1)
end
end)
end
inst:AddComponent("explosive")
inst.components.explosive:SetOnExplodeFn(OnExplodeFn)
inst.components.explosive:SetOnIgniteFn(OnIgniteFn)
即可用火炬点燃放在地上的荧光果,荧光果会飞上天空爆炸,每放一颗补5点脑,为你的节日增加一点气氛吧。在地洞里放礼花可以引起地震。如果想连续燃放,就将荧光果摆成一排(距离要近一些),点燃一个,其他就会陆续被点燃
更多相关内容请关注:饥荒专区
责任编辑:Shy夏夏