黄炎龙 发表于 2013-5-21 21:41

【MOD求助】怎么通过mod修改target的值?

我想通过mod修改icestaff.lua的内容
想通过mod修改红色字体部分,改为 target.components.freezable:AddColdness(10)


local function onattack(inst, attacker, target)

    if attacker and attacker.components.sanity then
      attacker.components.sanity:DoDelta(-TUNING.SANITY_SUPERTINY)
    end

    if target.components.freezable then
      target.components.freezable:AddColdness(1)
      target.components.freezable:SpawnShatterFX()
    end




请问各位大侠,modmain.lua里应该怎么写。
页: [1]
查看完整版本: 【MOD求助】怎么通过mod修改target的值?