第137页:一支吹箭用20次
展开一三七.一支吹箭用20次(按百分比使用)
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\blowdart.lua文件,
1.将下列内容:
local function onhit(inst, attacker, target)
local impactfx = SpawnPrefab("impact")
if impactfx and attacker then
local follower = impactfx.entity:AddFollower()
follower:FollowSymbol(target.GUID, target.components.combat.hiteffectsymbol, 0, 0, 0 )
impactfx:FacePoint(attacker.Transform:GetWorldPosition())
end
inst:Remove()
end
替换为:
local function onfinished(inst)
inst:Remove()
end
local function onhit(inst, attacker, target)
local impactfx = SpawnPrefab("impact")
if impactfx and attacker then
local follower = impactfx.entity:AddFollower()
follower:FollowSymbol(target.GUID, target.components.combat.hiteffectsymbol, 0, 0, 0 )
impactfx:FacePoint(attacker.Transform:GetWorldPosition())
end
if inst.components.finiteuses.current > 0 then
if inst.prefab == "blowdart_walrus" then
inst:Remove()
else
attacker.components.inventory:Equip(inst)
end
end
end
2.在inst:AddComponent("inspectable")的下一行插入以下内容:
inst:AddComponent("finiteuses")
inst.components.finiteuses:SetOnFinished( onfinished )
inst.components.finiteuses:SetMaxUses(20)
inst.components.finiteuses:SetUses(20)
即可让一支吹箭使用20次,每次击中敌人后自动回到手中,可以修改其中2处数字20为想要的使用次数。不要与“吹箭无限使用(射中目标后自动回到手中)”一同修改
更多相关内容请关注:饥荒专区
责任编辑:Shy夏夏