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

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

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

第222页:我是巨鹿

展开

二二二.我是巨鹿(按键盘HOME键主角变身巨鹿,按END键还原)

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

  TheInput:AddKeyUpHandler(KEY_HOME, function()

  if inst.components.inventory:Has("goldnugget", 30) then

  inst.components.inventory:ConsumeByName("goldnugget", 30)

  inst.components.locomotor:Stop()

  inst.components.playercontroller:Enable(false)

  inst.AnimState:PlayAnimation("idle_shiver_pre")

  inst.AnimState:PushAnimation("idle_shiver_loop")

  inst.AnimState:PushAnimation("idle_shiver_pst", false)

  inst:DoTaskInTime(1, function()

  inst.AnimState:SetBank("deerclops")

  inst.AnimState:SetBuild("deerclops_build")

  inst:SetStateGraph("SGdeerclops")

  inst.AnimState:PlayAnimation("idle_loop", true)

  inst.Transform:SetScale(1.5,1.5,1.5)

  shadow:SetSize( 6, 3.5 )

  local pos = GetPlayer():GetPosition()

  GetSeasonManager():DoLightningStrike(pos)

  inst.components.health:SetInvincible(true)

  inst.components.hunger:Pause()

  inst.components.combat:SetDefaultDamage(500)

  inst.components.combat.hiteffectsymbol = "deerclops_body"

  inst.components.combat.onhitotherfn = function()

  inst.SoundEmitter:PlaySound("dontstarve/creatures/deerclops/attack")

  inst.components.playercontroller:ShakeCamera(inst, "FULL", 0.5, 0.05, 2, 40)

  end

  inst.components.combat.playerdamagepercent = 0

  inst.components.combat:SetAreaDamage(10, 1)

  inst.components.temperature:SetTemp(20)

  inst.components.playercontroller:Enable(true)

  end )

  end

  end )

  TheInput:AddKeyUpHandler(KEY_END, function()

  inst.components.locomotor:Stop()

  inst.components.playercontroller:Enable(false)

  inst.AnimState:PlayAnimation("taunt")

  inst:DoTaskInTime(1, function()

  inst.AnimState:SetBank("wilson")

  inst.AnimState:SetBuild(name)

  inst:SetStateGraph("SGwilson")

  inst.AnimState:PlayAnimation("idle")

  inst.Transform:SetScale(1,1,1)

  shadow:SetSize( 1.3, .6 )

  local pos = GetPlayer():GetPosition()

  GetSeasonManager():DoLightningStrike(pos)

  inst.components.health:SetInvincible(false)

  inst.components.hunger:Resume()

  inst.components.combat:SetDefaultDamage(TUNING.UNARMED_DAMAGE)

  inst.components.combat.hiteffectsymbol = "torso"

  inst.components.combat.onhitotherfn = nil

  inst.components.combat:SetAreaDamage(0, 0)

  inst.components.temperature:SetTemp(nil)

  inst.components.playercontroller:Enable(true)

  end )

  end )

  即可在你深陷绝境之时,对电脑屏幕大喊“我是巨鹿”,并同时按下键盘HOME键,主角将变身无敌巨鹿(锁血、锁饥饿、不怕冷),对敌人展开恐怖的报复吧(按Ctrl + 鼠标左键攻击)。每次变身将消耗30个黄金,身上黄金数不足时不会变身。想要变回主角时,按键盘END键即可。注意,由于巨鹿变身时会招来闪电,并且本身具备大面积杀伤的能力,所以请远离基地变身,且尽量不要带同伴。修改过“神奇跳跃”的话,不要在变身巨鹿时跳跃

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

责任编辑:Shy夏夏

上一页 221 222 223 224 225 226 227 228 229 230 231 下一页
友情提示:支持键盘左右键“← →”翻页

本文是否解决了您的问题

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