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

How to change unit range (from melee to ranged)

Did it help?

  • yes

    Votes: 0 0.0%
  • no

    Votes: 0 0.0%
  • only little

    Votes: 0 0.0%

  • Total voters
    0
Status
Not open for further replies.
Level 2
Joined
Feb 25, 2019
Messages
9
Hi there, (you can skip this part,it only says how i got that idea to make it)

I saw some of the people having problems with making unit from melee to range. Lot of "advices" was to do it by orb,but that is stupid and it doesnt work for ground units. Another advice was to create two units (one melee and one ranged) and change between them. Well that was good,but it works only for units,if it is hero you need to make it a hero ability. That can be good but lot of people wanted to make that change by item and that is problem,because you cant apply hero ability to item. It was chance but when i was playing one custom game (island survivor) i receive that you can throw a stone at enemy and i got an idea. So these steps i made to change melee unit into a range unit when that unit aqcuires
an item.
TRICK:it works not by changing your range,but by making your unit use an modified ability (modified Hurl Boulder) instead of using your basic attack. For that you will need two trigers,one variable new ability and new item.
Prepare your ability:
1)
Go to object editor editor and find Hurl Boulde (rock golem has this ability) -->i renamed it as Arrow
2) Change "Missile art" to night elf archer's arrow and remove stun (to remove it you need to go to buff,create new one and change it's model to none.mdl,after that go to your ability and change Stats-Buff to this none. Also change duration for hero and unit to zero)
3) Change cooldown and mana cost to 0,change cast range to range you want to make that unit shoot from.Add string to "Art - animation names",new string will be called attack (this isnt important and you dont have to do it,but it will make your unit use and attack animation when he uses our new ability).
4) Finish it by yourself by changing some unimportant things (icon-I used icon from upgrades Strenght of moon,name...)

Picture:
upload_2019-3-11_16-13-50.png

(I now that is not the best quality,but i think it is still readable)

Make item and triger:

1) Create new item called Bow (make it from item armor bonus).Delete all special things that original item have,so remove all of it's abilities (if you want to make it,so your hero will hold bow in his hands feel free to add that ability,that will do it. If you dont know how to make it find it on another media because thats not why we are here)
2)Now it is time to make triggers.We will need: a)two triggers
b)one variable
3) First trigger: if hero has a Bow item,add our modified Hurl boulder ability to him,that will make him use it for the first time. You will need to create new variable,I called it "attacked_unit".All needed thing will be in this picture:

upload_2019-3-11_17-1-45.png

Note:you need to do it exactly as it is in this picture,if you change position of setting variable,it wont work!


4) Second trigger: if hero uses his ability (modified Hurl boulder) than make hero use it that ability again and again (if you order him to go somewhere,he will stop attacking).

Because of bugs we will need that varible we created before. As you can expect there is picture:
upload_2019-3-11_16-30-51.png


Note:that WAIT 0.00 seconds is very important,it wont work without it (It was a chance that i discovered that if i want to make it work i need to add wait)


5) This isnt important and you dont have to do it but i wanted to let you know,that I made arrow item-item,that has charges and you need it (same like bow) to shoot from bow aswell. However,whenever you shoot from it,it will change the number of charges by -1 (if charges will be 0 you wont be able t oshoot from range anymore and need to find more arrows). If you want to make it too and dont know how to do it,just ask me and i will send you both new triggers (there are some new conditions and acrions).





Feel free to ask questions.





 

Attachments

  • upload_2019-3-11_16-25-52.png
    upload_2019-3-11_16-25-52.png
    151.4 KB · Views: 48
Status
Not open for further replies.
Top