• 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.

Ordering unit to deal max damage

Status
Not open for further replies.
Level 10
Joined
Nov 28, 2008
Messages
655
Is it possible to trigger a unit to deal the maximum damage it can upon attacking if it has a buff?

So if the unit's damage range is 15-18, then it deals 18.

If the unit has a damage bonus such as command aura +3, so it's 15-18 +3 then it deals 21.


The long way would be to manually add it all up and deal the damage the long way... But that would either require a damage system, or a crap load of code.


That is a very kewl idea though!!

but as far as I know, there is no easy solution.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
I don't think so, not without disabling both of his attacks at least.

For units you can always replace a unit (without removing/recreating) by using the Chaos ability, which would allow you to use alternate units that have their damage as "18-18" in the example you gave. The problem with this is that it does not work properly on heroes, because their attributes are added together or something along those lines.

There really isn't a lot available for changing object characteristics at run-time (in game). Sure, there is SetUnitMoveSpeed, I don't understand how much more difficult it would have been to have a SetUnitDamage as well. Hopefully there this kind of stuff if available in the Galaxy editor, I hate being so limited by the API.
 
Level 6
Joined
Mar 22, 2009
Messages
276
It is possible if we just use a hero and the hero's damage from his main attribute. See the test map attached.
But when direct damage increase are added, they are not detected or can be detected by adding more trigger functions.
 

Attachments

  • MaxDamage.w3x
    14.4 KB · Views: 67
Status
Not open for further replies.
Top