游民星空 > 攻略秘籍 > 攻略 > 正文

饥荒 全人物解锁及主角自动回血等实用修改教程

2015-01-21 11:28:46 来源:互联网 作者:易宁 我要投稿

第109页:主角可夜视

展开

一零九.主角可夜视(按键盘H键开关夜视功能)

  用记事本打开游戏目录\data\DLC0001\scripts\prefabs\player_common.lua文件,在inst:AddComponent("playeractionpicker")的下一行插入以下内容:

  local function lightson(inst)

  inst.components.machine.ison = true

  inst.Light:Enable(true)

  end

  local function lightsoff(inst)

  inst.components.machine.ison = false

  inst.Light:Enable(false)

  end

  local light = inst.entity:AddLight()

  light:SetFalloff(1)

  light:SetIntensity(.8)

  light:SetRadius(10)

  light:Enable(false)

  light:SetColour(0/255, 255/255, 0/255)

  inst:AddComponent("machine")

  inst.components.machine.turnonfn = lightson

  inst.components.machine.turnofffn = lightsoff

  TheInput:AddKeyUpHandler(KEY_H, function() if inst.components.machine:IsOn() then inst.components.machine:TurnOff() else inst.components.machine:TurnOn() end end )

  即可在游戏中按键盘H键开关主角夜视功能,不再需要火炬、矿工灯

更多相关内容请关注:饥荒专区

责任编辑:Shy夏夏

上一页 101 102 103 104 105 106 107 108 109 110 111 下一页
友情提示:支持键盘左右键“← →”翻页

本文是否解决了您的问题

文章内容导航
游民星空APP
随手浏览游戏攻略
code
攻略合集
单机游戏下载
休闲娱乐
综合热点资讯
游民星空联运游戏