• 🏆 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 to ranged... possible?

Status
Not open for further replies.
Level 6
Joined
Apr 12, 2009
Messages
156
So I'm making this hero that has an inherently melee attack range, but I'm giving it an ability based on Black Arrow. Now, in the ability I set the cast range to 700. It would make sense for my hero to have a ranged attack when this ability is enabled. However, this unfortunately is not so.

Am I doing something wrong, or am I attempting something that just doesn't work? If so, does anyone know what would?
 
Level 3
Joined
Apr 29, 2009
Messages
32
You could try creating another unit with same model just a changed range and stuff. Then do something like when someone starts the effect of an ability and if the ability is the one that change range.

  • Event
  • Unit - A unit starts the effect of an ability
  • Condition
  • (Ability being cast) Equal To Your_Ability
  • Action
  • Set Real = Life of (Triggering Unit)
  • Set Real2 = Mana of (Triggering Unit)
  • Set Integer = Experience of (Triggering Unit)
  • Set TempLoc = Position of (Triggering Unit)
  • Set AbilityTimer = (Level of Casting Ability) * Your_Time_For_Each_Level
  • Unit - Remove (Triggering Unit)
  • Unit - Create 1 New_Unit_Type_With_Added_Range at TempLoc
  • Unit - Set Life of (Last Created Unit) = Real
  • Unit - Set Mana of (Last Created Unit) = Real2
  • Hero - Set Experience of (Last Created Unit) = Integer
Then do a new trigger that does the same thing just reversed when the timer ends.

I did this outside WE.

Remember the items too! Btw. You can also use hashtables if you rather want to.
 
Level 6
Joined
Apr 12, 2009
Messages
156
Use techtree upgrade from Riflemans, but put a negative value equal to the unit normal range.
Make the unit use the upgrade, then trigger the changing from one to another

Dont forget to make an second one that will return the range of the unit if its going to be like DotA's Troll ability.

A very interesting proposal. Now, if I was to go with this course of action, would an upgrade text appear somewhere around the hero's range stats because it is effected by this upgrade? You know what I mean?
 
Level 9
Joined
Dec 12, 2007
Messages
489
Use techtree upgrade from Riflemans, but put a negative value equal to the unit normal range.
Make the unit use the upgrade, then trigger the changing from one to another

Dont forget to make an second one that will return the range of the unit if its going to be like DotA's Troll ability.

but aren't upgrade or techtree is unresearchable? (does this word exist?)
 
Status
Not open for further replies.
Top