• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Take away a unit's damage

Status
Not open for further replies.
Level 15
Joined
Oct 16, 2010
Messages
941
I want to make a custom missile system for my map that creates a dummy unit that acts as a missile whenever a unit attacks another unit and then moves that dummy unit over time towards the target. All that I can do, but I can't figure out two vital things:

1. Since i'll be dealing damage using triggers, how do I prevent the unit from doing it's basic auto-attack damage? I tried setting the missile speed to 0 but it just dealt the damage instanstly. I don't want to set the unit's damage to 0 b/c I want players to be able to see how much damage the units do when they click on them in-game.

2. How would I go about preventing human players with ranged heroes from spamming the attack button to create multiple missiles within a small amount of time? I could set a timer obviously but then the timer would have to be exactly equal to the unit's attack speed and the speed wouldn't update while the timer is off and it seems like it would be difficult and likely become innacurate to keep track of a unit's attack speed.

Any help would be appreciated.
 
Level 12
Joined
Apr 16, 2010
Messages
584
1. Well first of all try to use triggers, i mean if attacked unit takes damage set life of this unit to Damage Taken, this will be like deflect ability and your dummy will still have damage and then you deal damage you want. Also if the dummy is about to be ordered and attacked maybe try using UI key, like S?
 
Level 7
Joined
Sep 5, 2006
Messages
334
you can messing around with the attack/armor damage reduction, it won't show any damage change but still makes attack useless
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Does your "missile damage system" is based on trigger ?
If it is, you can disable the dummy's attack by changing the "Combat - Attacks Enabled" change to "None"
This can be done IF and only IF, your system does damage based on TRIGGERS
 
Level 22
Joined
Jul 25, 2009
Messages
3,091
Set acquisition range to 0.. Like Ramza said, to make a custom missile, create a unit with the locust ability no damage no range, not combat at all, no move speed, and invulnerability. After that make a trigger that teleports the dummy units every 0.03 seconds a certain distance from the target using arithmetic.. Then add a trigger to spawn the dummy unit every time the unit attacks, then finally add immolation to the dummy unit, the immolation will be the damage, unless you don't want it to travel through targets. Then you should use something other than immolation, perhaps a trigger.

I figure you probably know most of that already.
 
Status
Not open for further replies.
Top