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

When a unit makes kills, it gains upgrades ?

Status
Not open for further replies.
Level 6
Joined
Nov 30, 2007
Messages
92
Is it possible to make it so that when a unit kills say 2 other units, it gains +2 damage, +1 defence and +50 HP, +25 mana if it has it ? And these upgrades are stackable ?

I want to make just a regular skirmish map but with this addition.

Thanks in advance,
peterrab
 
Level 4
Joined
Feb 5, 2005
Messages
38
If you want the "upgrade" to only apply for the specific killing unit do as follows:

Create an ability which grants the bonus effect of your choice (check item abilities) and set the number of levels to a very high number e.g. 100.

Create the following trigger:

  • Events
    • A unit Dies
  • Condition
    • Integer Comparison (Level of Ability(DmgBonusUpgradeAbi)) is less than 100)
  • Actions
    • Unit - Increase level of "DmgBonusUpgradeAbi" for (Killing Unit)
Hope that helps,

blackcud
 
Level 11
Joined
Nov 15, 2007
Messages
781
For the health and mana ones, there's an interesting quirk to the skills where they cannot have their levels increased; however, you can use this to your advantage, as another interesting quirk is if the ability is removed it only removes the amount of mana or life your unit gained from the level the ability is at.

So for example, if you create an ability based off of "Item Mana Bonus" or "Item Hitpoint Bonus" (Or whatever they're called) and gave it 2 levels - level 1 increases HP/Mana by 26, and level 2 increases it by 1, then you create a trigger
  • Events
    • Unit - A unit dies
  • Conditions
    • Unit-Type of (Killing Unit) = The unit you want to upgrade.
  • Actions
    • Unit - Add (Hitpoint or mana bonus ability) to (Killing Unit)
    • Unit - Increase level of (Hitpoint or mana bonus ability) for (Killing Unit)
    • Unit - Remove (Hitpoint or mana bonus ability) from (Killing Unit)

This, effectively, adds 26 HP or mana to the unit, and then removes 1, leaving him with a 25 HP/mana bonus.

For the other item bonuses I believe adding levels will work, but of course those are limited to how many levels of an ability you want to make.
 
Status
Not open for further replies.
Top