超级玩家
 
- 贡献度
- 41
- 金元
- 7275
- 积分
- 892
- 精华
- 0
- 注册时间
- 2009-5-23
|
本帖最后由 zenweiwei 于 2011-2-22 05:03 编辑
木棒打天下 所有近战武器,只要改这里
以棒球棒为例,在\_GameData\xml\ 里找到 baseball_bat.xml 棒球棒的文件
记事本打开得到下面
注,修改武器配置文件千万不要有中文不然会报错
下面只是部分注解:
<Baseball_Bat type="ITEM">
<Component class="CollisionComponent"
restingScale="1.2"
type="Box"
density="0.4"/>
<Component class="ItemComponent"
itemClass="1"
name="ITEM.BASEBALL_BAT"
icon="BAT"
counter_offset="142.0, 32.0"
size="3,1"
actionType="ATTACK_MELEE"
animName="closeCombat"
slot="item_slot"
hintLightColor="0,255,0,255"/>
<Component class="WeaponComponent"
targetDistance="200.0" 目标距离 近战武器默认是200.0将其改为 0
在加上这一行 range="500.0" 攻击距离 数字越大就打得越远1000的话何以扫屏了 近战武器是没有这一行的只有远程有
damage="50" 攻击伤害
staminaCost="0.0" 消耗耐力默认0.1消耗 0.0不消耗
knockbackForce="700.0"
attackSound="Basebat"
trailColor="135,90,45,75"
trailBone0="axe_bone03"
trailBone1="axe_bone02"
trailInterval="0.1"/>
</Baseball_Bat>
就可以隔空打僵尸
在分享下部分武器的文件名称
katana.xml 武士刀
axe.xml 斧头
grenade.xml 手榴弹
sniper.xml 大鸟
crossbow.xml 弩
storage.xml 散弹枪
pistol.xml 手枪
colt.xml 左轮
ammo_crossbow.xml ammo_pistol.xml ammo_rifle.xml ammo_shotgun.xml 枪的子弹配置文件
检一次子弹够有一辈子的方法
以手枪的为例打开ammo_pistol.xml得到
<Ammo_Pistol type="ITEM" script="scripts\ammo_pistol.lua" entityNote="ITEM.NOTE_AMMO_PISTOL">
<Component class="CollisionComponent"
restingScale="2.5"
type="Box"
offset="0.0, 0.0, 0.0"/>
<Component class="ItemComponent"
name="ITEM.AMMO"
icon="MUNITION"
counter_offset="6.0, 32.0"
size="1,1"
type="AmmoPistol"
actionType="USE_ITEM"
amount="1000"/> 改这里 默认是20颗子弹 我改了一千
</Ammo_Pistol> |
|