- Joined
- Mar 1, 2016
- Messages
- 10
Hi there. (I forgot my previous account and I have to get a new one to post)
I am recently trying to make a hero ability to increase hero's attack range. Just like Rifleman in DotA. And I know nothing about jass, so I decide to use "Long Rifle" upgrade try to achieve it. So I made a trigger:
Events:
Unit - A unit learns a skill
Conditions:
(Learned Hero Skill)Equal to Long Rifle
Actions:
Player - set the current research level of Long Rifle to 1 for (Triggering Player)
Trigger - Turn on Long Rifle Level 2
Trigger - Turn off(This trigger)
Basically I made a passive ability without any effect, and then I made it "when learns a skill, set research level to 1". So the hero gets bigger attack range.
And it worked. My hero did have a big attack range.
But here is the problem, how can the Hero gets WIDER attack range when they learn level 2 or 3 ability?
---------------------------------------------------------
I tried this:
Events:
Unit - A unit learns a skill
Conditions:
Level of Long Rife for (triggering unit) Equal to 1
Actions:
Player - set current research level of Long Rifles to 2 for (Triggering Player)
(then turn on Lv3 trigger, close this trigger)
how can I do that? I looked up and didn't find anything about this.
thanks for helping me as well as many others who want to make it.

I am recently trying to make a hero ability to increase hero's attack range. Just like Rifleman in DotA. And I know nothing about jass, so I decide to use "Long Rifle" upgrade try to achieve it. So I made a trigger:
Events:
Unit - A unit learns a skill
Conditions:
(Learned Hero Skill)Equal to Long Rifle
Actions:
Player - set the current research level of Long Rifle to 1 for (Triggering Player)
Trigger - Turn on Long Rifle Level 2
Trigger - Turn off(This trigger)
Basically I made a passive ability without any effect, and then I made it "when learns a skill, set research level to 1". So the hero gets bigger attack range.
And it worked. My hero did have a big attack range.
But here is the problem, how can the Hero gets WIDER attack range when they learn level 2 or 3 ability?
---------------------------------------------------------
I tried this:
Events:
Unit - A unit learns a skill
Conditions:
Level of Long Rife for (triggering unit) Equal to 1
Actions:
Player - set current research level of Long Rifles to 2 for (Triggering Player)
(then turn on Lv3 trigger, close this trigger)
how can I do that? I looked up and didn't find anything about this.
thanks for helping me as well as many others who want to make it.
