• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Take away a unit's damage

Status
Not open for further replies.
Level 15
Joined
Oct 16, 2010
Messages
942
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
333
you can messing around with the attack/armor damage reduction, it won't show any damage change but still makes attack useless
 
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