• 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.

Damage Bonus

Status
Not open for further replies.
Level 16
Joined
Jun 24, 2009
Messages
1,409
Erm.... this is kinda unefficient, it's much more easier to make an ability with 100 levels then auto fill the damage.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Damage Bonus for (Killing unit)) Greater than 0
        • Then - Actions
          • Unit - Increase level of Damage Bonus for (Killing unit)
        • Else - Actions
          • Unit - Add Damage Bonus to (Killing unit)
 
Erm.... this is kinda unefficient, it's much more easier to make an ability with 100 levels then auto fill the damage.

What if you had more than 100 kills? :p

edit
I know of a solution that would require 2 abilities (Works for up to 10000 kills which should be enough because I dont think any player would go above that unless he plays for weeks :p)

It requires Bribe's GUI UnitIndexer though (In the spells section)

  • DamageTrigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • wtvr you want
    • Actions
      • Set TempUnit = (Killing Unit)
      • Set TempInt = (Custom value of TempUnit)
      • Set DamageArray[TempInt] = DamageArray[TempInt] + 1
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageArray[TempInt] Mod 100) Equal To 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Damage Bonus (100-10000)) Greater than 0
            • Then - Actions
              • Unit - Increase level of Damage Bonus (100-10000) for TempUnit
              • Unit - Set level of Damage Bonus (1-99) for TempUnit to 1
            • Else - Actions
              • Unit - Add Damage Bonus (100-10000) for TempUnit
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Damage Bonus (1-99)) Equal to 0
            • Then - Actions
              • Unit - Add Damage Bonus (1-99) to TempUnit
            • Else - Actions
          • Unit - Increase level of Damage Bonus (1-99) for TempUnit
Damage Bonus (1-99) is an ability that has 100 levels.
The damage bonus at level 1 is 0 and at level 100, it's 99

Damage Bonus (100-10000) is an ability that has 100 levels.
The damage bonus at level 1 is 100 and at level 100, it's 10000. (increasing by 100 per level)



It's not the most efficient GUI trigger, but it'll get the job done.
I could do much better in vJASS by the way..
 
Status
Not open for further replies.
Top