• 🏆 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!

[Spell] Item increasing unit's range

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,657
No there isn't.

The usual way of making things with different attack ranges is to have an upgrade that increases that range (which happens for all units of that type for that player).
But that method is technically limited, but you can choose to what limit it can be used (aka turn on + turn off is one action, that action cannot be repeated, so you create like 200 of those actions and assume that it wont be activated + deactivated more than 200 times per game.)

The other (more elegant) method is to have an alternative unit in the Object Editor... one identical to the normal unit, but with a different attack range stat.
This ofcourse is not really useful for things that can be given to practically any unit, or even any hero.

Another option (my way :D) is to recode the basic attacks of units. This method gives you the most powerful api but requires some serious skill in map making and basic understanding of JASS. Something, I dont really expect from everyone here.
 
Level 15
Joined
Sep 6, 2015
Messages
576
I know this is a two-month old post, but in case you still need or anyone else that finds this thread needs this solution, I know one more way how to do it with glyphs, but it only works with consumable items, when they are consumed.
Namely, Glyph of Fortification is linked with a spell which is further linked with an upgrade with the same name. You can set the upgrade so that it gives attack range bonus in Object Editor under its effects. Additionally, you can also set the glyph to not be consumed when its picked, so that it can be consumed by right-clicking manually. Then, you can also change anything else you want in the glyph, its spell and its upgrade, but it must stay consumable for this to work.
 
Level 8
Joined
Jan 28, 2016
Messages
486
First attack would still take priority over second attack. Only reason it works to give melee heroes ranged anti-air is that their normal attack cannot hit air.

Ahh yes, you're right. As always. :p

In that case, the suggestions that Zordrak or Wietlol provided would be better suited to solve this.
 
Status
Not open for further replies.
Top