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

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

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

第265页:动力飞行帽

展开

二六五.动力飞行帽(戴羽毛帽在天空自由飞翔)

  用记事本打开游戏目录\data\DLC0001\scripts\prefabs\hats.lua文件,将下列内容:

  local function feather_equip(inst, owner)

  onequip(inst, owner)

  local ground = GetWorld()

  if ground and ground.components.birdspawner then

  ground.components.birdspawner:SetSpawnTimes(TUNING.BIRD_SPAWN_DELAY_FEATHERHAT)

  ground.components.birdspawner:SetMaxBirds(TUNING.BIRD_SPAWN_MAX_FEATHERHAT)

  end

  end

  local function feather_unequip(inst, owner)

  onunequip(inst, owner)

  local ground = GetWorld()

  if ground and ground.components.birdspawner then

  ground.components.birdspawner:SetSpawnTimes(TUNING.BIRD_SPAWN_DELAY)

  ground.components.birdspawner:SetMaxBirds(TUNING.BIRD_SPAWN_MAX)

  end

  end

  local function feather()

  local inst = simple()

  inst.components.equippable.dapperness = TUNING.DAPPERNESS_SMALL

  inst.components.equippable:SetOnEquip( feather_equip )

  inst.components.equippable:SetOnUnequip( feather_unequip )

  inst:AddComponent("fueled")

  inst.components.fueled.fueltype = "USAGE"

  inst.components.fueled:InitializeFuelLevel(TUNING.FEATHERHAT_PERISHTIME)

  inst.components.fueled:SetDepletedFn(generic_perish)

  替换为:

  local function feather_equip(inst, owner)

  onequip(inst, owner)

  local shadow = GetPlayer().entity:AddDynamicShadow()

  shadow:SetSize( 0, 0 )

  inst.task = inst:DoPeriodicTask(.01, function() owner.Physics:SetMotorVelOverride(20,10,0) end )

  inst:DoTaskInTime(3, function()

  if inst.task then inst.task:Cancel() inst.task = nil end

  inst.task = inst:DoPeriodicTask(.01, function() owner.Physics:SetMotorVelOverride(20,1,0) end)

  end )

  end

  local function feather_unequip(inst, owner)

  if inst.task then inst.task:Cancel() inst.task = nil end

  inst.task = inst:DoPeriodicTask(.01, function() owner.Physics:SetMotorVelOverride(20,-10,0) end)

  inst:DoTaskInTime(3, function()

  if inst.task then inst.task:Cancel() inst.task = nil end

  onunequip(inst, owner)

  local shadow = GetPlayer().entity:AddDynamicShadow()

  shadow:SetSize( 1.3, .6 )

  end)

  end

  local function feather()

  local inst = simple()

  inst.components.equippable.dapperness = TUNING.DAPPERNESS_SMALL

  inst.components.equippable:SetOnEquip( feather_equip )

  inst.components.equippable:SetOnUnequip( feather_unequip )

  即可在戴羽毛帽时开始起飞,爬升3秒后平飞,用键盘W、S、A、D键控制方向。想降落时卸载羽毛帽即可开始着陆,落地后会滑行一段(按W、S、A、D键可以减少滑行距离)。注意不要在爬升阶段卸载羽毛帽(平飞时再卸载即可),否则在惯性作用下将滑出很长一段距离

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

责任编辑:Shy夏夏

上一页 261 262 263 264 265 266 267 268 269 270 271 下一页
友情提示:支持键盘左右键“← →”翻页

本文是否解决了您的问题

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