🏆 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!
Trigger - Add (Entering Unit takes damage) to (Damage Detection)
Damage Detection
Events
Conditions
Actions
<Insert Need Actions>
You can make Critical strike stack by making a condition using loops for example if for every integer a loop between 1 and 6, if the unit has <Insert Item> in inventory integer A, add +<Insert Critical Strike Chance> to a variable. After that, make a condition saying that if a random number between 1 and 100 is lower than your variable, deal Damage Source x <Insert Value>.
Careful, this will make your spell damage crit too. If you want a damage detection system (which is necessary for a crit system), you will have to trigger all spell dmg.
It leaks and is generally a bad idea.
I wouldnt listen to him, it will slow your game down, and definatly lead to lag if you have any defence game. The only game I would use that for would be a regular map, with very little gameplay changes, and no unit spam.
Simple as crystal, you will learn to seperate attacks from other source of damage. Firstly by making all your abilities like frost nova casted by dummy instead of your main hero.
Secondly, use the trigger from jadegolem for this operation
Thirdly, check if damage source is a hero or not
Fourth Step, now you throw the logic jadegolem suggested and get over with it =X
The biggest problem here is that you can't detect the souce of the damage (only the damaging unit). The way I do this is replacing all damaging spells by Acid Bomb with 0.1 dmg and some dummy debuff. In the "Unit - Takes Damage" trigger, I test for the debuff (which, in case of Acid Bomb, is applied directly before the damage), and if it is present, I remove it and damage the unit accordingly by trigger.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.