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!
hello, I want to program the passive ability of dota´s sniper. I have no idea where to start, it is a skill that increases the range of the unit. Your help is appreciated in advance.
Create a custom dummy ability (can be of anything) and a custom upgrade based on the "Long Rifles" human upgrade. Create a trigger that will run off the event "Unit - A unit Learns a skill", then use the action "Player - Set the Current Research Level".
Keep note that this only works for ONE unit per player. I also believe this does not have backward compability.
There is an upgrade field which increases the range of a unit. The Human's "Long Rifles" has it by default. Add your custom upgrade to your unit's "Upgrades Used" field then make a trigger that researches the upgrade when the ability is learned like this:
Take Aim
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Take Aim
Actions
Player - Set the current research level of Long Rifles to (Level of Take Aim for (Triggering unit)) for (Owner of (Triggering unit))
Edit: Seems somebody answered this while I was writing my answer.
I also believe this does have backward compability.
Keep note that all units that use that upgrade and belong to the same player will all gain the effect from the upgrade.
I also believe that you cannot unlearn upgrades.
Keep note that all units that use that upgrade and belong to the same player will all gain the effect from the upgrade.
I also believe that you cannot unlearn upgrades.
The only problem with creating a dummy building to do the research is that there will be a delay, well unless you want to make it cool with the delay why not
The only problem with creating a dummy building to do the research is that there will be a delay, well unless you want to make it cool with the delay why not
You can set it directly with triggers. Having a building do it would cause the delay, as you mention, but it would also play the "research complete" sound which would be really strange with a hero ability being learned. I think it might also ping the minimap for you, but I don't remember if that happens in WC3.
The only problem with creating a dummy building to do the research is that there will be a delay, well unless you want to make it cool with the delay why not
You can set it directly with triggers. Having a building do it would cause the delay, as you mention, but it would also play the "research complete" sound which would be really strange with a hero ability being learned. I think it might also ping the minimap for you, but I don't remember if that happens in WC3.
What are you both even talking about? There is no need for a dummy building to do the research because the function "Player - Set Current Research Level" does it for you automatically. No sound is played, and it is applied the moment the Hero "learns" the skill. The only problem with this upgrade is that you can't reduce the level of it. You can only increase it.
There is an upgrade field which increases the range of a unit. The Human's "Long Rifles" has it by default. Add your custom upgrade to your unit's "Upgrades Used" field then make a trigger that researches the upgrade when the ability is learned like this:
Take Aim
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Take Aim
Actions
Player - Set the current research level of Long Rifles to (Level of Take Aim for (Triggering unit)) for (Owner of (Triggering unit))
Edit: Seems somebody answered this while I was writing my answer.
To add to this, you can't unresearch upgrades. Researching an upgrade will be permanent.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.