• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

(HELP) Linking upgrade to hero ability

Status
Not open for further replies.
Level 2
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.


:grin:
 
Level 14
Joined
Nov 30, 2013
Messages
926
You can clean the two of your triggers with this.
  • Long Rifles Ability
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to (What Ability)
    • Actions
      • Player - Set the current research level of Long Rifles to (Level of (What Ability) for (Learning Hero)) for (Owner of (Learning Hero))
 
Status
Not open for further replies.
Top