游戏达人
  
- 贡献度
- 80
- 金元
- 19067
- 积分
- 2237
- 精华
- 1
- 注册时间
- 2010-11-27
|
Have.Fun 发表于 2014-3-11 10:39 
易宁兄,请问如何让花环发光呢?我试着在 local function flower() 后面加入以下
戴花环可照明(不要与“迷魂花阵”一同修改)
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\hats.lua文件,将下列内容:
inst:AddComponent("perishable")
inst.components.perishable:SetPerishTime(TUNING.PERISH_FAST)
inst.components.perishable:StartPerishing()
inst.components.perishable:SetOnPerishFn(generic_perish)
inst.components.equippable:SetOnEquip( opentop_onequip )
替换为:
local function flower_equip(inst, owner)
opentop_onequip(inst, owner)
inst.Light:Enable(true)
end
local function flower_unequip(inst, owner)
onunequip(inst, owner)
inst.Light:Enable(false)
end
local light = inst.entity:AddLight()
light:SetFalloff(0.4)
light:SetIntensity(.7)
light:SetRadius(2.5)
light:SetColour(180/255, 195/255, 150/255)
light:Enable(true)
inst.components.equippable:SetOnEquip( flower_equip )
inst.components.equippable:SetOnUnequip( flower_unequip )
|
评分
-
1
查看全部评分
-
|