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

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

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

第208页:鱼人入侵

展开

二零八.鱼人入侵(每个傍晚都可能遭到众多鱼人的伏击)

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

  local function OnNight(inst)

  local player = GetPlayer()

  local pt = Vector3(player.Transform:GetWorldPosition())

  local nummerms = math.random(15)

  local ground = GetWorld()

  if math.random()< .2 then

  for k = 1, nummerms do

  local theta = 1 * 2 * PI

  local radius = 12

  local result_offset = FindValidPositionByFan(theta, radius, nummerms, function(offset)

  local x,y,z = (pt + offset):Get()

  local ents = TheSim:FindEntities(x,y,z , 1)

  return not next(ents)

  end)

  if result_offset and ground.Map:GetTileAtPoint((pt + result_offset):Get()) ~= GROUND.IMPASSABLE then

  local merm = SpawnPrefab("merm")

  merm.Transform:SetPosition((pt + result_offset):Get())

  merm.components.combat.target = player

  GetPlayer().components.playercontroller:ShakeCamera(inst, "FULL", 0.2, 0.02, .25, 40)

  local fx = SpawnPrefab("collapse_small")

  local pos = pt + result_offset

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

  end

  end

  end

  end

  inst:ListenForEvent( "dusktime", function() OnNight( inst ) end, GetWorld())

  即可让主角在地面时,每天傍晚都有一定概率遭到众多鱼人(数字随机)的伏击。建议鱼人人数少时就和它们拼了,人数多时就跑,它们会暂时占据这个地区,等到白天它们睡着时再各个击破

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

责任编辑:Shy夏夏

上一页 201 202 203 204 205 206 207 208 209 210 211 下一页
友情提示:支持键盘左右键“← →”翻页

本文是否解决了您的问题

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