Posted: Tue Feb 11, 2020 3:41 pm Post subject:
[Solved]AttachEffect on self while firing enemy?
all mods that use Ares usually have either units who put effect on enemy while attacking, or effect themselves. can smb please give me hints on simpliest(shortest code-wise) way to put effect on unit-itself while still making a distant attack on enemy(without effecting it)?
for the moment i found only use of animations to "re-call" another weapon during use of main enemy attacking weapon, but that involves quite a heap of code, so maybe there is some other/simple way? Last edited by rey on Mon Jan 03, 2022 10:26 am; edited 1 time in total QUICK_EDIT
If your unit only has 1 weapon, the easiest (and cleanest IMO) way would be to:
ART
Code:
[UNIT]
PrimaryFireFLH=0,0,0 ; bang on in the middle of the unit so no other unit gets affected
SecondaryFireFLH=70,0,140 ;change this to whatever your unit actually uses, note that if you change this on infantry, sequence may need to be altered
RULES
Code:
[UNIT]
Primary=DummyWeapon
ElitePrimary=DummyWeaponE ;if range increases add elite dummy
Secondary=ProperWeapon
EliteSecondary=ProperWeaponE
ReloadAmount=1
NoAmmoWeapon=1
Reload=60 ; set this to how often you want the buff reapplied
Ammo=1
[DummyWeapon]
Damage=1
ROF=1
Range=6 ;make sure it matches the proper weapon's range
Projectile=DummyProj ;to explode instantly
Speed=100
Warhead=BuffWH
Ammo=1 ;necessary
[ProperWeapon]
Ammo=0 ;just add this to the weapon
[BuffWH]
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0% ;change it to only affect the unit's armor, or better yet add a custom armor just for the purpose of this buff to the unit. make it 10% so no damage is parsed
CellSpread=0.25 ;play around with this but doesn't need to be higher than this so it only affects the unit
AffectsEnemies=no
AttachEffect.Duration=60 ;play around with duration to suit
AttachEffect.Animation=INSERT POWER UP ANIM HERE
AttachEffect.TemporalHidesAnim=yes
AttachEffect.FirepowerMultiplier=1.15 ;change this to whatever buff you want, check the manual
AttachEffect.Cumulative=no ;if you want, recommended
@XxpeddyxX interesting approach, thank you for unexpected idea!
@cxtian39 that's kinda what i was talking about - this way demands at least new weapon, WH, projectile, plus as it's a "spawned weapon" it can't be set to affect only allies/enemies(at least i didn''t find a way to have area effect for only one side). QUICK_EDIT
If your unit only has 1 weapon, the easiest (and cleanest IMO) way would be to:
ART
Code:
[UNIT]
PrimaryFireFLH=0,0,0 ; bang on in the middle of the unit so no other unit gets affected
SecondaryFireFLH=70,0,140 ;change this to whatever your unit actually uses, note that if you change this on infantry, sequence may need to be altered
RULES
Code:
[UNIT]
Primary=DummyWeapon
ElitePrimary=DummyWeaponE ;if range increases add elite dummy
Secondary=ProperWeapon
EliteSecondary=ProperWeaponE
ReloadAmount=1
NoAmmoWeapon=1
Reload=60 ; set this to how often you want the buff reapplied
Ammo=1
[DummyWeapon]
Damage=1
ROF=1
Range=6 ;make sure it matches the proper weapon's range
Projectile=DummyProj ;to explode instantly
Speed=100
Warhead=BuffWH
Ammo=1 ;necessary
[ProperWeapon]
Ammo=0 ;just add this to the weapon
[BuffWH]
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0% ;change it to only affect the unit's armor, or better yet add a custom armor just for the purpose of this buff to the unit. make it 10% so no damage is parsed
CellSpread=0.25 ;play around with this but doesn't need to be higher than this so it only affects the unit
AffectsEnemies=no
AttachEffect.Duration=60 ;play around with duration to suit
AttachEffect.Animation=INSERT POWER UP ANIM HERE
AttachEffect.TemporalHidesAnim=yes
AttachEffect.FirepowerMultiplier=1.15 ;change this to whatever buff you want, check the manual
AttachEffect.Cumulative=no ;if you want, recommended
Long time passed and i settled that case in some other way, but again stumbled with kinda similar problem and now really need hints why my approach doesn't work.
I'm trying to modify unit(infantry) and add buff that it gets for short duration after attacking. For some reason the unit doesn't get the buff, though the code works = when i make Damage= in Art.ini high, plus Warhead has big Cellspread and only this unit in Versus - it does hurt unit and nobody else(but no buff acquired).
Both no luck, damage happens, no buff acquired. I understand only some commands in Art.ini, so totally don't understand if i'm setting it somehow wrong? QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum