游戏达人
  
- 贡献度
- 80
- 金元
- 18952
- 积分
- 2225
- 精华
- 1
- 注册时间
- 2010-11-27
|
靚仔 发表于 2013-9-28 17:07 
能不能再贴里发,我下不了(“犬牙手雷”和“高爆地雷”)
一三0.犬牙手雷(扔犬牙炸倒一大片,饥荒世界最强武器)
用记事本打开游戏目录\data\scripts\prefabs\houndstooth.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function onequip(inst, owner)
owner.AnimState:OverrideSymbol("swap_object", "swap_houndstooth", "swap_houndstooth")
owner.AnimState:Show("ARM_carry")
owner.AnimState:Hide("ARM_normal")
end
local function onunequip(inst, owner)
owner.AnimState:ClearOverrideSymbol("swap_object")
owner.AnimState:Hide("ARM_carry")
owner.AnimState:Show("ARM_normal")
end
local function onhit(inst, attacker, target)
local impactfx = SpawnPrefab("impact")
if impactfx then
local follower = impactfx.entity:AddFollower()
follower:FollowSymbol(target.GUID, target.components.combat.hiteffectsymbol, 0, 0, 0 )
impactfx:FacePoint(Vector3(attacker.Transform:GetWorldPosition()))
end
inst:Remove()
SpawnPrefab("collapse_small").Transform:SetPosition(inst.Transform:GetWorldPosition())
SpawnPrefab("explode_small").Transform:SetPosition(inst.Transform:GetWorldPosition())
local pos = Vector3(inst.Transform:GetWorldPosition())
GetClock():DoLightningLighting()
GetPlayer().components.playercontroller:ShakeCamera(inst, "FULL", 0.7, 0.02, .5, 40)
end
local function onthrown(inst, data)
inst.AnimState:SetOrientation( ANIM_ORIENTATION.OnGround )
end
local function OnDeath(inst)
inst:DoTaskInTime(0, function()
inst.components.combat:DoAreaAttack(inst, 5)
end)
end
inst:AddComponent("weapon")
inst.components.weapon:SetDamage(3000)
inst.components.weapon:SetRange(15, 18)
inst:AddComponent("combat")
inst.components.combat:SetDefaultDamage(3000)
inst:ListenForEvent("animover", OnDeath)
inst:AddComponent("equippable")
inst.components.equippable:SetOnEquip(onequip)
inst.components.equippable:SetOnUnequip(onunequip)
inst.components.equippable.equipstack = true
inst:AddComponent("projectile")
inst.components.projectile:SetSpeed(60)
inst.components.projectile:SetOnHitFn(onhit)
inst:ListenForEvent("onthrown", onthrown)
即可在装备犬牙时,对一群敌人扔出(远距离对敌人按鼠标左键)炸倒一大片。敌人离你太近时不要扔,以防炸到自己
一三一.高爆地雷(指南针扔在地上作地雷)
用记事本打开游戏目录\data\scripts\prefabs\compass.lua文件,在MakeInventoryPhysics(inst)的下一行插入以下内容
local function OnExplodeFn(inst)
SpawnPrefab("collapse_small").Transform:SetPosition(inst.Transform:GetWorldPosition())
SpawnPrefab("explode_small").Transform:SetPosition(inst.Transform:GetWorldPosition())
local pos = Vector3(inst.Transform:GetWorldPosition())
GetClock():DoLightningLighting()
GetPlayer().components.playercontroller:ShakeCamera(inst, "FULL", 0.7, 0.02, .5, 40)
inst:Remove()
end
local function OnExplode(inst, target)
if target and not target:HasTag("smallbird") and not target:HasTag("chester") then
OnExplodeFn(inst)
target.components.health:DoDelta(-TUNING.HEALING_SUPERHUGE*30)
end
end
inst:AddComponent("mine")
inst.components.mine:SetRadius(TUNING.TRAP_TEETH_RADIUS*2)
inst.components.mine:SetAlignment("player")
inst.components.mine:SetOnExplodeFn(OnExplode)
inst.components.mine:StartTesting()
inst:AddComponent("stackable")
inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM
即可将指南针改造为高爆地雷,敌人踩上后会爆炸,主角、自养高鸟、狗箱不会触发。指南针在生存选项(画着绳套)下,用1个黄金、1张纸制造。多个指南针在放置时,按住Ctrl键再用鼠标左键一一放置
|
|