• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Attack bonus at longer ranges

Status
Not open for further replies.
Level 4
Joined
Aug 13, 2013
Messages
22
Is it possible to give a ranged unit an attack bonus at longer ranges (e.g. an attack bonus at more than half the maximum range)?

Things I tried that didn't work:
- Giving the unit two attacks, one with a maximum range of half the total range I want, another with higher damage and a minimum range of half the total range I want - doesn't work because minimum range field applies to both attacks.
- Using Critical Strike - it doesn't have a minimum range field.
 
Is it possible to give a ranged unit an attack bonus at longer ranges (e.g. an attack bonus at more than half the maximum range)?

Things I tried that didn't work:
- Giving the unit two attacks, one with a maximum range of half the total range I want, another with higher damage and a minimum range of half the total range I want - doesn't work because minimum range field applies to both attacks.
- Using Critical Strike - it doesn't have a minimum range field.

It might be possible to make an ability that reduces damage instead. Maybe even based on critical strike.
 
maybe you can search for impetus skill in dota?

its like create the temporary location for the attacker and the attacked and check if attacker have specific buff then use some mathematic damage from the temporary distance < u must use DDS for this i guess

if you want to make it easy use instant missile shot like riflemen missile so you dont need the DDS

can only explain it in general though
 
if you want to make it easy use instant missile shot like riflemen missile so you dont need the DDS
You would still need DDS, you would need entirely instant animations as well IIRC. The "attacking" unit event fires whenever the unit starts attacking so if you clicked elsewhere a moment before the unit actually fires the projectile it would still trigger.

You need to detect the unit taking damage and the damage source, create temporary locations there and check the distance in between them and if it is above your threshold then deal extra damage to the unit who took damage.
That could be done in GUI with little knowledge, the problem is detecting the unit taking damage and you also have to exclude the extra damage dealt to the unit because that could also fire another "damage taking" event and result in an infinite loop.
 
Thanks to everyone for their help! I couldn't get it to work with Critical Strike (reducing damage at short-range instead), and I'm not very experienced with triggers, so this could take a while...
 
Thanks to everyone for their help! I couldn't get it to work with Critical Strike (reducing damage at short-range instead), and I'm not very experienced with triggers, so this could take a while...

Well, with a damage detection system you can just detect when a unit takes damage.
Then, when that happens you get the distance between damager and victim and use whatever formula you wish to modify the damage.

Fancy approach:
Store the range of all relevant units in variables(or retrieve it through acquisition range).
Then modify damage compared to how much of their range the units are using, so that at 0 range damage is 0, while at 100% range they have full or maybe double damage.
 
Status
Not open for further replies.
Back
Top