Posted: Thu Nov 03, 2022 2:26 pm Post subject:
AttachEffect.ArmorMultiplier not working on Big Stuctures
Subject description: Attacking units and pillboxes give the effect but Construction Yards and Power Plants don't
So the animation DOES damage to structures even the big ones, so that means the animation is hitting the target,
but the AttachEffect isn't given unless it's small. Tried it with pillboxes.
Essentially, if you know about the Synchronin/Synchronaut in Mental Omega, that's what I'm trying to achieve.
Posted: Thu Nov 03, 2022 3:38 pm Post subject:
Re: AttachEffect.ArmorMultiplier not working on Big Stuctures
[TARGETPAINTER]
Weapon=LaserPointer (why do you have the weapon that spawns the anim attached to the anim, are you trying to make an infinite loop?)
Normalized=yes
Layer=ground
AltPalette=no (no is the default so you can remove this)
Sticky=yes (this is old buggy logic that doesn't work properly & isn't needed as the AttachEffect will stick to its targets anyway)
Damage=1 (the Weapon= code at the top makes this redundant)
Layer=top (you have layer twice)
UseNormalLight=yes
ZAdjust=-512
YSortAdjust=2000
[LaserPointerWH]
CellSpread=.5 (is there a reason why you need such a small CellSpread? I presume the weapon isn't inaccurate, so it would be better to remove this)
PercentAtMax=.5 (same as above)
Verses=3%,3%,3%,3%,3%,3%,3%,3%,3%,3%,3%
InfDeath=2
AnimList= (if you dont list anything then you can remove this code)
Sparky=no (no is the default so you can remove this)
ProneDamage=70% ; Presumes air burst
Bullets=yes (this is used by the IFV & doesn't do anything here)
AttachEffect.ArmorMultiplier=0.5
AttachEffect.Duration=5 _________________
Sorry about the messy code. I created a lot of units at this point and I know about the mistakes,
I'm going to clean them after as I want to arrange them properly as well.
I've looked into ModEnc and used those probably on some unit and just copy pasted it. And if you look at the comments (the one with the ";"), they came from one of the stuff from rulesmd.
But yeah, Do you know why AttachEffect doesn't work on larger structures?
Also I'll make sure they're cleaner when posting it in the forums. It might make things confusing now that I think about it.
Also also, LaserPointer is not the weapon that spawns the anim it's another weapon with a different name of course.
Another edit, Damage=1 is redundant? I thought that was important. I remember having another weapon that did have damage but it didn't work. It had to be on the animation. QUICK_EDIT
If you use Damage= on a animation then you also need to use Warhead= otherwise the game wont know how to apply the damage. You are using the Weapon= code though witch was added by Ares & replaces the Damage/Warhead code with a full weapon. So either remove the Damage= & keep the Weapon= or remove the Weapon= & add a Warhead=. Edit: Ignore this bit I miss remembered how the Ares Weapon= code is handled.
Using the unit's main weapon to apply the AttachEffect would be the easiest method. I dont understand why you need to have a weapon spawn an anim, that spawns a weapon that applies the AttachEffect o.0 Seams a but unnecessary, unless there is also some other effect/trigger you haven't mentioned?
I haven't heard of anyone else having problems with AttachEffect on larger structures. I presume it's because of the unusual way you have the weapons/anims set up or something to do with the CellSpread.
For a simple laser weapon that lowers the targets armour all you should need is:
Code:
[LaserPointer]
Damage=1
ROF=100 ;change to what you want
Range=10 ;change to what you want
IsLine=true
IsHouseColor=true
Projectile=Invisible
Warhead=LaserPointerWH
MigAttackCursor=yes ;optional extra
[LaserPointerWH]
Verses=1%,1%,1%,1%,1%,1%,1%,1%,1%,1%,1%
AttachEffect.ArmorMultiplier=0.5
AttachEffect.Duration=100 ;make it the same or higher then ROF
AttachEffect.Animation=TARGET
[Spyglass] ;Actual Weapon used to summon the TARGETPAINTER
Damage=1
ROF=1
Range=10
Projectile=TargetDesignator
Speed=100
Warhead=SpyglassWH
LaserInnerColor = 216,0,0
LaserDuration = 1
IsLaser=true ; this flag tells the game to use the special laser draw effect
IsSingleColor=yes
I dont understand why you dont just add the ArmorMultiplier= to the SpyglassWH. What is the reason for attaching the animation with the weapon & then the effect with a second weapon attached to the animation? _________________
That is what I used. I don't really understand how the Animation Damage code work as I had never seen an example,
but when I gave the TARGETPAINTER's dummy weapon "LaserPointer" a Damage=, it makes the animation do nothing and I had to give the damage to the TARGETPAINTER.
I do know however that the actual weapon that spawns the anim needs to have damage.
I don't really have proper tutorials on how to use Animation Damage and mostly based it of off what was written in Ares documentation and I still got
confused at first as it wasn't stated there that it was in art.ini(but I did know about it later as I'm using it now)
Usually I look at examples as I'm used to making datapacks.
But yeah, I will try your code and move the AttachEffect from the TARGETPAINTER's dummy weapon "LaserPointer" to the weapon that spawns the anim which is "Spyglass"
and see if it works.
Edit: This was made before you replied I was still typing when you already replied QUICK_EDIT
From my understanding from Ares documentation, that is how you get effects to work.
But just to be clear, for future references in doing codes, does the weapon used by the animation (not the one that creates it) actually do damage?
What is the purpose of adding a weapon to animation? It would be helpful in understanding for me if there was an example,
as it does feel like I'm just doing something redundant.
Also confusing for me is that the code actually works. Though for some things only like 1x1 structures and all infantry and units but not big structures.
Edit: Just tested it and it works! Thanks Mig Eater again for the help!
But now I'm even more confused. I guess I might be coding things wrong after all. Anyways back to rechecking things again. QUICK_EDIT
Let's just say Attach Effects aren't the best to attach further effects on buildings. May have something to do with the hitboxes.
To get around your issue with bigger buildings, simply move AttachEffect.ArmorMultiplier= to the FIRST attach effect. Use the AttachEffect Animation ONLY for doing damage. 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