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

Dwarven Sniper´s take aim

Status
Not open for further replies.
Level 4
Joined
Mar 15, 2011
Messages
39
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.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
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.
 
Last edited:
Level 16
Joined
Mar 27, 2011
Messages
1,349
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.

To add to this, you can't unresearch upgrades. Researching an upgrade will be permanent.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
To add to this, you can't unresearch upgrades. Researching an upgrade will be permanent.

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.

Oh my that was a very bad typo. I meant to put I DO NOT believe xD I rephrased my sentence a few times before typing that out and didn't notice.

Keep note that all units that use that upgrade and belong to the same player will all gain the effect from the upgrade.
I said this under the assumption that he will be making a Hero out of it :D
 
Level 12
Joined
May 22, 2015
Messages
1,051
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 :p

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.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
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 :p

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.
 
Level 4
Joined
Mar 15, 2011
Messages
39
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.

Is this supported if the unit has a transform ability ?. If it becomes increasing range maintained?
 
Status
Not open for further replies.
Top