代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。

原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html


 1
 2一三八.吹箭无限使用(射中目标后自动回到手中)
 3
 4	MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/blowdart.lua文件,将下列内容:
 5
 6		impactfx:FacePoint(attacker.Transform:GetWorldPosition())
 7	end
 8	inst:Remove()
 9
10	替换为:
11
12		impactfx:FacePoint(attacker.Transform:GetWorldPosition())
13	end
14	if inst.prefab == "blowdart_walrus" then
15	   inst:Remove()
16	else
17	   attacker.components.inventory:Equip(inst)
18	end
19
20	即可让吹箭射中目标后自动回到手中,不要与“一支吹箭用20次(按百分比使用)”一同修改