[Mod代码]关于霰弹枪改弹夹的并完成无限弹药
潜渊症吧
全部回复
仅看楼主
level 11
Misor63
楼主
这是代码,目前的情况是弹夹完成了,但是无法正常显示耐久,而且改condition也无法正常消耗,霰弹枪使用的时候是打掉弹夹里的霰弹枪子弹,spawnitem也不能正常生成下一发的子弹,推测是那个StatusEffect的OnUse的type没有被判定(drawinventory和canbeselect设置为true是为了更直观的观察到子弹没有被正常生成而且一直在消耗)
有没有大佬支个招,看下是哪里的问题无法消耗耐久
2021年12月20日 14点12分
1
level 11
Misor63
楼主
图太糊了 我再发一遍看看
2021年12月20日 14点12分
2
level 11
Misor63
楼主
这百度压图也太严重了
2021年12月20日 14点12分
3
level 11
Misor63
楼主
<ItemContainer hideitems="true" capacity="1" drawinventory="true" canbeselected="true" ShowConditionInContainedStateIndicator="true" SpawnWithId="shotgunshell" removecontaineditemsondeconstruct="true" containedstateindicatorstyle="bullet"> <Containable items="shotgunshell" /> <!--Spawn an SMG round on use. Condition -5.0 -> 20 shots per magazine.--> <StatusEffect type="OnUse" target="This" condition="-5.0" disabledeltatime="true"> <SpawnItem identifiers="shotgunshell" spawnposition="ThisInventory" /> </StatusEffect> </ItemContainer> <!--Magazines can be combined to raise condition.--> <Holdable canBeCombined="true" slots="Any,RightHand,LeftHand" handle1="0,0" msg="ItemMsgPickUpSelect" > <StatusEffect type="OnActive" target="This" > <SpawnItem identifiers="shotgunshell" spawnposition="ThisInventory" /> </StatusEffect></Holdable>
2021年12月20日 14点12分
4
level 11
Misor63
楼主
最后添加的那个手持的onactive状态可以正常生成子弹,但是之前的onuse状态不起效
2021年12月20日 14点12分
5
level 11
Misor63
楼主
或者有没有什么mod佬的讨论组给我问问
2021年12月20日 14点12分
6
level 11
Misor63
楼主
不是我不想做无限喷子子弹跟无限轨道炮啊 这个真的是技术条件不允许
2021年12月20日 15点12分
8
level 11
Misor63
楼主
之后还有做EK武器跟少前武器mod的无限弹药计划,但是都绕不过这种啊。
除非我直接给他们加把新枪了,到时候他们一改数据我还得一个个排查,这巨额工作量我顶不住啊
2021年12月20日 15点12分
9
level 11
Misor63
楼主
感谢大佬hogwartsexpre1的指点,技术问题已经解决,无限轨道炮指日可待了
2021年12月20日 17点12分
15
level 6
c5f7f9
很简单的事被你搞这么复杂
要做弹夹直接套用冲锋枪弹夹的代码就可以了
直接复制过来,把弹夹名字和 identifier改掉,
散弹枪和弹夹里面凡是引用其他物品的都照着冲锋枪三件套的格式依样画葫芦就行了
无限子弹更容易了,把condition="-5.0"删掉就行了
<StatusEffect type="OnUse" target="This" condition="-5.0" disabledeltatime="true">
<SpawnItem identifiers="smground" spawnposition="ThisInventory" />
</StatusEffect>
2021年12月21日 01点12分
16
Misor63
现在都解决完了,已经没事了
2021年12月21日 02点12分
Misor63
你可以看我楼上跟那个大佬的楼中楼,光改成这样子是用不了的,最早我就是这个思路,然后自以为不用修改喷子,之后嘛,看完就知道了
2021年12月21日 02点12分
c5f7f9
看到你们盖了31楼真是急死人。。。
2021年12月21日 03点12分
Misor63
@c5f7f9
我玩这游戏其实还没两周,我确实很多东西不了解
2021年12月21日 05点12分
1