找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2102|回复: 8

求助:武器能否伤害自己?

[复制链接]
发表于 2024-5-21 09:32:16 | 显示全部楼层 |阅读模式
在Ares和Phobos的基础上如何让某个步兵单位的治疗武器可以治疗自己且只能治疗自己(也就是其他同单位无法被治疗)?
发表于 2024-5-21 09:38:12 来自手机 | 显示全部楼层
本帖最后由 ruanhuhu 于 2024-5-21 10:13 编辑

武器抛射体炸膛

或者phobos的FeedbackWeapon=
回复

使用道具 举报

 楼主| 发表于 2024-5-21 10:15:59 | 显示全部楼层
本帖最后由 子夜001 于 2024-5-21 10:19 编辑

Dropping=yes吗?似乎没有生效。忘记说了,武器是用的Phobos护盾逻辑的盾破武器。想做一个盾破后自身持续恢复血量的兵种。
回复

使用道具 举报

发表于 2024-5-21 10:54:31 来自手机 | 显示全部楼层
子夜001 发表于 2024-5-21 10:15
Dropping=yes吗?似乎没有生效。忘记说了,武器是用的Phobos护盾逻辑的盾破武器。想做一个盾破后自身持续恢 ...

核弹有一句代码专门声明有自我伤害,你猜为什么
回复

使用道具 举报

 楼主| 发表于 2024-5-21 11:06:43 | 显示全部楼层
以下代码,是哪里写错了吗?小白接收批评
[zongxiong]  ;接受治疗的步兵单位
Armor=mengshou
ShieldType=xiongtexing   ;想做低于30%血盾破所以用了护盾


[huolitishengzongxiong]   ;盾破武器
Damage=20
ROF=10
Range=1.5
Projectile=Invisiblelowxiong    ;想做持续回血的空爆抛体
Speed=100
Warhead=zongxiong     ;防止暴毙的加防ae
FeedbackWeapon=huolitishengxiong  ;反馈武器
Report=
Anim=

[Invisiblelowxiongxiong]  ;反馈武器抛体
Image=none
Dropping=yes
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no

[huolitishengxiong]   ;反馈武器
Damage=20
ROF=10
Range=1.5
Projectile=Invisiblelowxiongxiong
Speed=100
Warhead=zongxiongxiong
Report=
Anim=

[huolitishengxiong2]
Damage=20
ROF=10
Range=1.5
Projectile=Invisiblelowxiong2  
Speed=100
Warhead=zongxiong2         ;纯粹为有动画才加的ae
FeedbackWeapon=huolitishengxiong   ;反馈武器
Report=
Anim=

[huolitishengxiong3]
Damage=20
ROF=10
Range=1.5
Projectile=Invisiblelowxiong3
Speed=100
Warhead=zongxiong3
FeedbackWeapon=huolitishengxiong  ;反馈武器
Report=
Anim=

[huolitishengxiong4]
Damage=20
ROF=10
Range=1.5
Projectile=Invisiblelowxiong4
Speed=100
Warhead=zongxiong4
FeedbackWeapon=huolitishengxiong  ;反馈武器
Report=
Anim=

[huolitishengxiong5]
Damage=20
ROF=10
Range=1.5
Projectile=Invisiblelowxiong5
Speed=100
Warhead=zongxiong5
FeedbackWeapon=huolitishengxiong  ;反馈武器
Report=
Anim=

[huolitishengxiong6]
Damage=20
ROF=10
Range=1.5
Projectile=Invisiblelowxiong6
Speed=100
Warhead=zongxiong6
FeedbackWeapon=huolitishengxiong  ;反馈武器
Report=
Anim=

[Invisiblelowxiong]
Image=none
Dropping=yes
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no
Airburst=yes
AirburstWeapon=huolitishengxiong2
Cluster=1


[Invisiblelowxiong2]
Image=none
Dropping=yes
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no
Airburst=yes
AirburstWeapon=huolitishengxiong3
Cluster=1


[Invisiblelowxiong3]
Image=none
Dropping=yes
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no
Airburst=yes
AirburstWeapon=huolitishengxiong4
Cluster=1

[Invisiblelowxiong4]
Image=none
Dropping=yes
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no
Airburst=yes
AirburstWeapon=huolitishengxiong5
Cluster=1

[Invisiblelowxiong5]
Image=none
Dropping=yes
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no
Airburst=yes
AirburstWeapon=huolitishengxiong6
Cluster=1

[Invisiblelowxiong6]
Image=none
Dropping=yes
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no


[zongxiong]
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
Versus.mengshou=-100%
Versus.wudi=0%
Versus.jiajianzhu=0%
Versus.wudi2=0%
InfDeath=1
AnimList=
PreventScatter=yes  
DisableWeapons.Duration=300  ;这些时间内停止攻击
AttachEffect.Duration=300
AttachEffect.Animation=nvshenhuifu
AttachEffect.ArmorMultiplier=99

[zongxiongxiong]  ;反馈武器的弹头
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
Versus.mengshou=-100%
Versus.wudi=0%
Versus.jiajianzhu=0%
Versus.wudi2=0%
InfDeath=1
AnimList=
PreventScatter=yes

[zongxiong2]  
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
Versus.mengshou=-100%
Versus.wudi=0%
Versus.jiajianzhu=0%
Versus.wudi2=0%
InfDeath=1
AnimList=
PreventScatter=yes
AttachEffect.SpeedMultiplier=1
AttachEffect.Animation=nvshenhuifu
AttachEffect.Duration=30

[zongxiong3]
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
Versus.mengshou=-100%
Versus.wudi=0%
Versus.jiajianzhu=0%
Versus.wudi2=0%
InfDeath=1
AnimList=
PreventScatter=yes
AttachEffect.SpeedMultiplier=1
AttachEffect.Animation=nvshenhuifu
AttachEffect.Duration=30

[zongxiong4]
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
Versus.mengshou=-100%
Versus.wudi=0%
Versus.jiajianzhu=0%
Versus.wudi2=0%
InfDeath=1
AnimList=
PreventScatter=yes
AttachEffect.SpeedMultiplier=1
AttachEffect.Animation=nvshenhuifu
AttachEffect.Duration=30

[zongxiong5]
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
Versus.mengshou=-100%
Versus.wudi=0%
Versus.jiajianzhu=0%
Versus.wudi2=0%
InfDeath=1
AnimList=
PreventScatter=yes
AttachEffect.SpeedMultiplier=1
AttachEffect.Animation=nvshenhuifu
AttachEffect.Duration=30

[zongxiong6]
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
Versus.mengshou=-100%
Versus.wudi=0%
Versus.jiajianzhu=0%
Versus.wudi2=0%
InfDeath=1
AnimList=
PreventScatter=yes
AttachEffect.SpeedMultiplier=1
AttachEffect.Animation=nvshenhuifu
AttachEffect.Duration=30
回复

使用道具 举报

发表于 2024-5-21 11:18:50 来自手机 | 显示全部楼层
核弹井可以杀死自己
回复

使用道具 举报

 楼主| 发表于 2024-5-21 11:27:03 | 显示全部楼层
DamageSelf。完美解决,自己太2了,感谢各位大佬指点。
回复

使用道具 举报

发表于 2024-5-21 11:28:53 | 显示全部楼层
本帖最后由 ruanhuhu 于 2024-5-21 11:30 编辑
子夜001 发表于 2024-5-21 11:27
DamageSelf。完美解决,自己太2了,感谢各位大佬指点。

顺便还有一句
TypeImmune=yes
这个是同类免疫

建议把教程详细看一下 遇到问题先查找教程 没有再问

When set in the unit's rules entry, the TypeImmune=Yes flag will render an object immune to damage (but not targetting) from a weapon on a unit of the same identity and owner.

回复

使用道具 举报

发表于 2024-5-21 12:02:51 | 显示全部楼层


可以试试这种写法,护盾破坏触发武器添加AE效果,增加护甲和回血动画。该注册的注册。

[Shield]

BreakAnim=;只播放一次,如果要用动画建议设置循环次数
BreakWeapon=PassiveResist;该武器爆炸位置固定在持有护盾单位上



[PassiveResist];被动
Damage=1
ROF=99
Range=1
Projectile=Invisible3
Speed=1
Warhead=PassiveResist_WH
ExtraWarheads=
ExtraWarheads.DamageOverrides=

Burst=1
FeedbackWeapon=


[PassiveResist_WH];
Verses=2%,2%,2%,2%,2%,2%,2%,2%,2%,2%,2%
AffectsEnemies=no
CellSpread=.1
PreventScatter=yes
Malicious=yes


AttachEffect.Animation=
AttachEffect.Duration=120
AttachEffect.Cumulative=false

AttachEffect.ArmorMultiplier=1.5



[Heal_Base_WH]
Verses=-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
PreventScatter=yes
PenetratesBunker=yes
Malicious=yes
AffectsEnemies=no
CellSpread=.1
PercentAtMax=1



[Buff_Heal];Art
Rate=45 ;900/45=20
Damage=2
Warhead=Heal_Base_WH
Layer=Top
ZAdjust=-2000
YSortAdjust=128



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|Archiver|手机版|管理员邮箱|红警DIY论坛 |网站地图

GMT+8, 2026-8-27 21:51 , Processed in 0.053443 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表