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

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

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

第169页:速射步枪

展开

一六九.速射步枪(黄色魔杖左键点射、右键连射蜂刺子弹)

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

  local function yellow()

  local inst = commonfn("yellow")

  inst.fxcolour = {223/255, 208/255, 69/255}

  inst.castsound = "dontstarve/common/staffteleport"

  inst:AddComponent("spellcaster")

  inst.components.spellcaster:SetSpellFn(createlight)

  inst.components.spellcaster:SetSpellTestFn(cancreatelight)

  inst.components.spellcaster.canuseonpoint = true

  inst.components.spellcaster.canusefrominventory = false

  inst:AddComponent("reticule")

  inst.components.reticule.targetfn = function()

  return Vector3(GetPlayer().entity:LocalToWorldSpace(5,0,0))

  end

  inst.components.reticule.ease = true

  inst.components.finiteuses:SetMaxUses(TUNING.YELLOWSTAFF_USES)

  inst.components.finiteuses:SetUses(TUNING.YELLOWSTAFF_USES)

  inst:AddTag("nopunch")

  return inst

  end

  替换为:

  local function yellow()

  local inst = commonfn("yellow")

  inst.fxcolour = {223/255, 208/255, 69/255}

  inst.castsound = "dontstarve/common/staffteleport"

  local function canattack(inst, target)

  if GetPlayer().components.inventory:Has("stinger", 1) and TheInput:IsMouseDown(MOUSEBUTTON_RIGHT) then

  inst.components.weapon:LaunchProjectile(inst, target)

  end

  if GetPlayer().components.inventory:Has("stinger", 1) then

  return true

  end

  end

  local function onattack_yellow(inst, owner, target)

  owner.SoundEmitter:PlaySound("dontstarve/creatures/eyeballturret/shotexplo")

  SpawnPrefab("die_fx").Transform:SetPosition(target.Transform:GetWorldPosition())

  TheCamera:Shake("FULL", 0.2, 0.02, .5, 40)

  owner.components.inventory:ConsumeByName("stinger", 1)

  end

  inst:AddComponent("weapon")

  inst.components.weapon:SetDamage(100)

  inst.components.weapon:SetRange(25, 30)

  inst.components.weapon:SetOnAttack(onattack_yellow)

  inst.components.weapon:SetCanAttack(canattack)

  inst.components.weapon:SetProjectile("fire_projectile")

  inst.components.finiteuses:SetMaxUses(TUNING.YELLOWSTAFF_USES*1000)

  inst.components.finiteuses:SetUses(TUNING.YELLOWSTAFF_USES*1000)

  return inst

  end

  即可在装备黄色魔杖时,对敌人按鼠标左键点射,按鼠标右键连射,身上没有蜂刺时无法射击(不要光顾着按住右键扫射,时不时关注一下还有多少子弹)。黄色魔杖在远古选项(画着远古祭坛)下,用4个噩梦燃料、2个活木头、2个黄色宝石制造,制造时需要靠近远古祭坛。黄色魔杖原有种小星星功能取消

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

责任编辑:Shy夏夏

上一页 161 162 163 164 165 166 167 168 169 170 171 下一页
友情提示:支持键盘左右键“← →”翻页

本文是否解决了您的问题

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