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

melee/range weapons using items

Status
Not open for further replies.
Level 25
Joined
Feb 2, 2006
Messages
1,689
hey,
in my map I have items like swords and bows for the same unit, so I wanted to ask what is the best way to enable/disable range attack for a unit (not like orbs which just allow you to attack air units).
I think there's only a possibility using researches which enable/disable first and second attack type. Is there any other ability especially for items which does what I need?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Upgrades cannot be disabled. As far as I know, there's no ability like that (except for maybe chaos, but more on that later).
All maps that have this feature I know of have created 2 units with as only difference their range. They then switch between the two depending on the item they carry.
Chaos does exactly that (switch between unit types), but you can just as well trigger it.
 
Level 25
Joined
Feb 2, 2006
Messages
1,689
thx for your help. Do I have to create an ability for each transformation? For example two abilities to transform the unit into a range unit and another one to transform it back?
This could be a problem since my unit itself might have some other transform abilities and I would have to create an ability/write triggers for each of these transformations as well.
Besides does anyone know which data has to be saved if the unit is a hero and which is kept (like inventory, experience etc.).
I am definitely going to test this a bit more but it's very sad if this is the only possibility.
 
Status
Not open for further replies.
Top