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

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

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

第320页:筋斗云

展开

二六零.筋斗云(按键盘Z键召唤筋斗云在天上飞行,再按Z键落地)

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

  TheInput:AddKeyUpHandler(KEY_Z, function()

  if not inst:HasTag("flycloud") then

  inst:AddTag("flycloud")

  inst.components.locomotor:Stop()

  inst.components.talker:ShutUp()

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

  inst.AnimState:PlayAnimation("give")

  inst:DoTaskInTime(0.3, function()

  inst.cloud = SpawnPrefab("corn_cooked")

  inst.cloud.Physics:SetActive(false)

  inst.cloud.Transform:SetScale(1.8, 1.8, 1.8)

  inst.cloud.AnimState:SetMultColour(255/255,255/255,255/255,0.6)

  inst.cloud.AnimState:SetBloomEffectHandle("shaders/anim.ksh")

  inst.cloud:RemoveComponent("perishable")

  inst.cloud:RemoveComponent("edible")

  inst.cloud:RemoveComponent("stackable")

  inst.cloud:RemoveComponent("inventoryitem")

  inst.cloud:RemoveComponent("bait")

  inst.cloud:RemoveComponent("tradable")

  inst.cloud:RemoveComponent("burnable")

  inst.cloud:RemoveComponent("propagator")

  inst.cloud.persists = false

  inst.cloud:AddTag("NOCLICK")

  local follower = inst.cloud.entity:AddFollower()

  follower:FollowSymbol( inst.GUID, "swap_body", 0, 60, 0 )

  local pt = inst:GetPosition()

  inst.Transform:SetPosition(pt.x, 10, pt.z)

  local shadow = inst.entity:AddDynamicShadow()

  shadow:SetSize( 0, 0 )

  inst.gogogo = inst:DoPeriodicTask(.01, function() inst.Physics:SetMotorVelOverride(25,1.5,0) end)

  end )

  else

  inst:RemoveTag("flycloud")

  inst.components.locomotor:Stop()

  inst.components.talker:ShutUp()

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

  inst.AnimState:PlayAnimation("give")

  inst:DoTaskInTime(0.3, function()

  if inst.cloud then inst.cloud:Remove() inst.cloud = nil end

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

  local pt = inst:GetPosition()

  inst.Transform:SetPosition(pt.x, 0, pt.z)

  local shadow = inst.entity:AddDynamicShadow()

  shadow:SetSize( 1.3, .6 )

  inst.Physics:ClearMotorVelOverride()

  inst.Physics:ClearMotorVelOverride()

  end )

  end

  end )

  即可口中默念咒语——“走你”,并按下键盘Z键,召唤筋斗云在天上飞行,用键盘W、S、A、D键控制方向,再次按Z键可落地

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

责任编辑:Shy夏夏

上一页 311 312 313 314 315 316 317 318 319 320 321 下一页
友情提示:支持键盘左右键“← →”翻页

本文是否解决了您的问题

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