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

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

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

第137页:一支吹箭用20次

展开

一三七.一支吹箭用20次(按百分比使用)

  用记事本打开游戏目录\data\DLC0001\scripts\prefabs\blowdart.lua文件,

  1.将下列内容:

  local function onhit(inst, attacker, target)

  local impactfx = SpawnPrefab("impact")

  if impactfx and attacker then

  local follower = impactfx.entity:AddFollower()

  follower:FollowSymbol(target.GUID, target.components.combat.hiteffectsymbol, 0, 0, 0 )

  impactfx:FacePoint(attacker.Transform:GetWorldPosition())

  end

  inst:Remove()

  end

  替换为:

  local function onfinished(inst)

  inst:Remove()

  end

  local function onhit(inst, attacker, target)

  local impactfx = SpawnPrefab("impact")

  if impactfx and attacker then

  local follower = impactfx.entity:AddFollower()

  follower:FollowSymbol(target.GUID, target.components.combat.hiteffectsymbol, 0, 0, 0 )

  impactfx:FacePoint(attacker.Transform:GetWorldPosition())

  end

  if inst.components.finiteuses.current > 0 then

  if inst.prefab == "blowdart_walrus" then

  inst:Remove()

  else

  attacker.components.inventory:Equip(inst)

  end

  end

  end

  2.在inst:AddComponent("inspectable")的下一行插入以下内容:

  inst:AddComponent("finiteuses")

  inst.components.finiteuses:SetOnFinished( onfinished )

  inst.components.finiteuses:SetMaxUses(20)

  inst.components.finiteuses:SetUses(20)

  即可让一支吹箭使用20次,每次击中敌人后自动回到手中,可以修改其中2处数字20为想要的使用次数。不要与“吹箭无限使用(射中目标后自动回到手中)”一同修改

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

责任编辑:Shy夏夏

上一页 131 132 133 134 135 136 137 138 139 140 141 下一页
友情提示:支持键盘左右键“← →”翻页

本文是否解决了您的问题

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