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

unit ranks

Status
Not open for further replies.
Hello
Is there a way to put a rank on an unit and that the unit will get a higher rank if it kill more unit?
Like this:
0-4 kill: recruit
5-19 kill : Private
20-39 kill : Sergent
40-59 kill : Caporal
60-99 kill : Colonel
100+Kill : Leader

I know that it's possible to make an ability that shows the rank of the unit
But the problem, i dont know how to change the rank when an unit kill the amount of unit required. And please, tell me what the base ability must to be.
Oh and another thing, when an unit is promoted, the unit will has better stats:
recruit : normal stats
Private : +50 HP (total :50)
Sergent : +150 HP (total : 200) + 10 Damage(total : 10)
Caporal : +300 HP (Total : 500) + 25 DMG (Total : 35)
Colonel : +500 HP (Total : 1000) + 65 DMG (Total : 100)
Leader : (Total : +1000HP) (Total +100 DMG) + 25% DAMAGE as Command aura.
And when an unit is promoted, other troops of the same unit type will not be promoted if they don't have enought kill
Oh and a last thing: The rank system will only start if the unit owner researched a technology
SO: If player 1 has tecnology 1, he will unlock the rank system, but player 2 will not has the rank system if he doesnt researched the technology 1. ok?
Please tell me if im writting wrong word^^ english isnt my first language :(
thank^^
 
Since the required amount for killed units is uneven, here:
Main Trigger:
  • Ranks
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is an illusion) Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current research level of Technology 1 for (Owner of (Killing unit))) Greater than 0
        • Then - Actions
          • Set KillsLoad = (Load (Key rank) of (Key (Killing unit)) from Hashtable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KillsLoad Less than 20
            • Then - Actions
              • Hashtable - Save (KillsLoad + 1) as (Key rank) of (Key (Killing unit)) in Hashtable
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KillsLoad Greater than 5
                  • (Unit-type of (Killing unit)) Equal to PromotionUnits[1]
                • Then - Actions
                  • For each (Integer A) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of (Killing unit)) Equal to PromotionUnits[(Integer A)]
                          • ((Integer A) + 1) Less than or equal to 6
                        • Then - Actions
                          • Unit - Replace (Killing unit) with a PromotionUnits[((Integer A) + 1)] using The old unit's relative life and mana
                        • Else - Actions
                • Else - Actions
            • Else - Actions
              • Hashtable - Save 0 as (Key rank) of (Key (Killing unit)) in Hashtable
              • For each (Integer B) from 1 to 6, do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of (Killing unit)) Equal to PromotionUnits[(Integer B)]
                      • ((Integer B) + 1) Less than or equal to 6
                    • Then - Actions
                      • Unit - Replace (Killing unit) with a PromotionUnits[((Integer B) + 1)] using The old unit's relative life and mana
                    • Else - Actions
        • Else - Actions
For the full system, check the attached map below:
View attachment Ranks.w3x

Note: The system is MUI.
 
Status
Not open for further replies.
Top