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

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

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

第136页:装备回旋镖召唤猎物

展开

一三六.装备回旋镖召唤猎物(打猎游戏)

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

  local function cancreatelight(staff, caster, target, pos)

  local ground = GetWorld()

  if ground and pos then

  local tile = ground.Map:GetTileAtPoint(pos.x, pos.y, pos.z)

  return tile ~= GROUND.IMPASSIBLE and tile < GROUND.UNDERGROUND

  end

  return false

  end

  local function createlight(staff, target, pos)

  local names = {"crow","robin","robin_winter","frog","mosquito","bee","killerbee","butterfly","rabbit","babybeefalo"}

  local name = names[math.random(#names)]

  local prey = SpawnPrefab(name)

  prey.Transform:SetPosition(pos.x, pos.y, pos.z)

  end

  inst:AddComponent("spellcaster")

  inst.components.spellcaster:SetSpellFn(createlight)

  inst.components.spellcaster:SetSpellTestFn(cancreatelight)

  inst.components.spellcaster.canuseonpoint = true

  inst.components.spellcaster.canusefrominventory = false

  即可在装备回旋镖后,在空地上点鼠标右键召唤猎物,包括鸟、昆虫、青蛙、兔子、小牛,尽情捕猎吧

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

责任编辑:Shy夏夏

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

本文是否解决了您的问题

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