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

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

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

第162页:萌时代

展开

一六二.萌时代(扔蜂蜜将怪物变回童年)

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

  local function onhit(inst, attacker, target)

  inst:Remove()

  SpawnPrefab("collapse_small").Transform:SetPosition(target.Transform:GetWorldPosition())

  target.Transform:SetScale(0.7, 0.7, 0.7)

  if target.components.health then

  target.components.health.currenthealth = 1

  target.components.health.maxhealth = 1

  end

  if target.components.combat then

  target.components.combat:SetDefaultDamage(0)

  target.components.combat.target = nil

  end

  if target.components.locomotor then

  target.components.locomotor.runspeed = 1

  target.components.locomotor.walkspeed = 1

  end

  end

  local function onthrown(inst, data)

  inst.AnimState:SetOrientation( ANIM_ORIENTATION.OnGround )

  end

  inst:AddComponent("weapon")

  inst.components.weapon:SetDamage(0)

  inst.components.weapon:SetRange(20, 25)

  inst:AddComponent("equippable")

  inst.components.equippable.equipstack = true

  inst:AddComponent("projectile")

  inst.components.projectile:SetSpeed(60)

  inst.components.projectile:SetOnHitFn(onhit)

  inst:ListenForEvent("onthrown", onthrown)

  即可扔蜂蜜将怪物变成无害的童年怪物,怪物体型变小、生命值为1、没有攻击力、行走缓慢。因为蜂蜜可装备,如果主角也想吃蜂蜜,请拿起蜂蜜对主角按鼠标右键

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

责任编辑:Shy夏夏

上一页 161 162 163 164 165 166 167 168 169 170 171 下一页
友情提示:支持键盘左右键“← →”翻页

本文是否解决了您的问题

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