• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

No-damage attack. Use triggered projectile instead.

Status
Not open for further replies.
Level 7
Joined
Oct 20, 2010
Messages
184
For what I'm working on, I am attempting to have a particular unit's attack fire a missile in a line that can be avoided. For this, I am using a missile system. So, I have everything in working order... except the original attack. Is there a way I can make an attack not be registered, or not do damage? So when the unit attacks and launches this triggered projectile, their actual attack isn't causing any issues.
 
Level 12
Joined
Mar 13, 2020
Messages
421
What’s wrong with set the combat attack to none so he has no damage ?

Or if you wanna display his damage in the UI as Icon then use the damage engine from bribe and do

Damage event equal to 1.00

Damageeventsource equal to YourHeroUnitWhatEver

Set DamageAmount = 0

With the Damage Engine you will have the animation still because your unit try to attack and you just set his damage to 0 but if you need that animation and want to fire your missle per dummy on it

Then you need a second trigger

DamageEvent equal to 1.00

DamageEventSource equal to YourHero

And then run your missle triggers here

So it will look like he attacks but in real the first trigger set his damage afterwards to 0 and the real damage is from the Missle
 
Last edited:
Level 7
Joined
Oct 20, 2010
Messages
184
I was hoping there was a way that the original attack doesn't land. Otherwise, even with damage set to 0, it'll trigger DamageEvents.
 
Level 7
Joined
Oct 20, 2010
Messages
184
The problem I refer to for your method is that the attack still is a hit, it just does 0 damage. So the triggered missile hits and the initial attack. If for instance, I had an on-damage event that gave damage a chance to summon a footman, the 0 damage attack would have a chance to summon the footman.

I don't see a way for an attack to fire and not have it hit its target, so I was hoping there was a way I didn't know about.
 
Level 12
Joined
Mar 13, 2020
Messages
421
Not really you can add a condition to the Summon a Footman

If
DamageAmount not Equal to 0

And the problem would be solved...

Same I did when I wanted to display damage as floating text and did my custom dodge stats I used this so it doesn’t show the 0 numbers...
But I think that would count as hit too

Or try demolisher passiv with Negativ -1.00 value and give it to the unit
And set Targets allowed to units
And remove the only buildings target but that would count as hit too I think
 
Last edited:
Level 7
Joined
Oct 20, 2010
Messages
184
That is true and what I've done. Though adding a said condition to all of my triggers would be a hassle, it seems like the best alternative.
 
Status
Not open for further replies.
Top