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

Level up heroes with an upgrade

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
473
Hello everyone, i have an upgrade with levels 0-9 levels and when it's at level 0 i would like all heroes own by a player who has a unit with that available research, to be set to level 1 when they are on the map, become revivable and are trained. Furthermore, when the research is advanced to levels 1,2,3,4,5,6,7,8,9 all heroes owned by the player who advanced the research, should have their level set to 2,3,4,5,6,7,8,9,10 respectively and for all their states (when revivable, when trained, when just on the map).
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
You should take care of the leaks, but here is my idea:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Iron Forged Swords
    • Actions
      • Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
        • Loop - Actions
          • Hero - Set (Picked unit) Hero-level to (Current research level of Iron Forged Swords for (Picked player)), Hide level-up graphics
I don't know if this works for reviving heroes.
For trained heroes you have change their level once they finished training (the same could work for reviving heroes).
 
Level 9
Joined
Jun 10, 2013
Messages
473
You should take care of the leaks, but here is my idea:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Iron Forged Swords
    • Actions
      • Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
        • Loop - Actions
          • Hero - Set (Picked unit) Hero-level to (Current research level of Iron Forged Swords for (Picked player)), Hide level-up graphics
I don't know if this works for reviving heroes.
For trained heroes you have change their level once they finished training (the same could work for reviving heroes).
That didn't work for me :/ plus when the research is first researched heroes should be advanced to level 2.
 
Level 9
Joined
Jun 10, 2013
Messages
473
Ok got it to work with the following triggers

  • Level up system good On the Field
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Level up heroes
    • Actions
      • Set Group1 = (Units owned by (Owner of (Researching unit)) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in Group1 and do (Actions)
        • Loop - Actions
          • Hero - Set (Picked unit) Hero-level to ((Current research level of Level up heroes for (Owner of (Researching unit))) + 1), Show level-up graphics
      • Custom script: call DestroyGroup (udg_Group1)
  • Level up system good On the Field
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Level up heroes
    • Actions
      • Set Group1 = (Units owned by (Owner of (Researching unit)) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in Group1 and do (Actions)
        • Loop - Actions
          • Hero - Set (Picked unit) Hero-level to ((Current research level of Level up heroes for (Owner of (Researching unit))) + 1), Show level-up graphics
      • Custom script: call DestroyGroup (udg_Group1)
  • Level up system good when reviving
    • Events
      • Unit - A unit Finishes reviving
    • Conditions
    • Actions
      • Set Group1 = (Units owned by (Owner of (Reviving Hero)) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in Group1 and do (Actions)
        • Loop - Actions
          • Hero - Set (Picked unit) Hero-level to ((Current research level of Level up heroes for (Owner of (Reviving Hero))) + 1), Show level-up graphics
      • Custom script: call DestroyGroup (udg_Group1)
Question: this won't affect races who don't have this research correct? and nor would it affect allies's and enemies's heroes when researched either?
 
Status
Not open for further replies.
Top