Hydralisk-CriticalStrikeEffectEventsUnit-AnyUnittakesFatalorNon-FatalAnydamage(fromHydralisk-CriticalStrike(Chance)effects)LocalVariablesDelay=0<Integer>DamageAmount=0.0<Real>ConditionsHydralisk-CritDelay[(Ownerof(Damagingunit))] == False
Actions
Variable - Set Hydralisk - Crit Delay[(Ownerof(Damagingunit))] = True
Variable - Set Delay = (Value of Weapons "NeedleSpines" "Period[0]" for player (Owner of (Damaging unit)) as an integer)
Variable - Set Damage Amount = (Real(((Value of Effects "NeedleSpinesDamage" "Amount[0]" for player (Owner of (Damaging unit)) as an integer) * 2)))
UI - Display (Text(Damage Amount) with Any Precision decimal places) for (All players) to Subtitle area
Environment - Deal damage using Hydralisk - Critical Strike - Dummy Damage on (Triggering unit) from (Damaging unit) with Damage Amount extra damage
General - Wait (Real(Delay)) Game Time seconds
Variable - Set Hydralisk - Crit Delay[(Ownerof(Damagingunit))] = False
Ok. This makes it wait so it only fires once. I also switched the damaging effect to be a dummy effect with 0 damage. It was already doing double damage with having it be 0, cause it's a damage response.
Now the new issue: It's not *2 when the damage isn't a whole number. So if it's 1.5 it is erroring out trying to times that by 2. I have everything set to real so I don't see why that's an issue. Also the damage amount isn't adding the buffed damage the hero has. It is adding the upgraded damage you recieve from upgrades, but not the green () buffed damage.
Hydralisk-CriticalStrikeEffect2EventsUnit-AnyUnittakesFatalorNon-FatalAnydamage(fromHydralisk-CriticalStrike(Chance)effects)LocalVariablesDelay=0<Integer>ConditionsHydralisk-CritDelay[(Ownerof(Damagingunit))] == False
Actions
General - Wait 0.1 Game Time seconds
Variable - Set Hydralisk - Crit Delay[(Ownerof(Damagingunit))] = True
Variable - Set Delay = (Value of Weapons "NeedleSpines" "Period[0]" for player (Owner of (Damaging unit)) as an integer)
Environment - Deal damage using Hydralisk - Critical Strike - Dummy Damage on (Triggering unit) from (Damaging unit) with Hydralisk - Crit Damage[(Ownerof(Damagingunit))] extra damage
General - Wait (Real(Delay)) Game Time seconds
Variable - Set Hydralisk - Crit Delay[(Ownerof(Damagingunit))] = False
This deals double damage based on the % damage response on the weapon of the hero.
Or you create a Set Effect in data editor and add your normal Damage Effect + another Damage Effect, with whatever additional damage you want the critical strike to cause, with the %-to-hit value set to whatever chance you want it to hit ;)
EDIT: That would be another way to do it, I think... if I got this thread right :P
Use catalog value to define damage amount then make all necessary math and change current life of a victim. This approach will work fine, but you will need to change damage of the units with triggers too in this case(instead of behaviours), cuz u cant operate catalog values without issues (if you will change catalog value it will change damage effect to all unit that uses same weapon in this case, but i think you already know it)
How do I deal the weapon damage used above in the extra damage section? I can't figure out how to do it.
I want the damage to be weapon dmg * 2.
The critical strike chance damage is 0. It's just a damage response with a % that is a dummy for firing this trigger.
You could use a Catalog Field Value Get function to find the damage of the weapon.
@BasharTeg: Go
Thank you that worked, but now I'm having another problem occur.
It's repeating the text and damage amount until it KILLS the unit... Why? And this is happening after attacking one time.
@Zero0018: Go
Try Create effect on unit from unit
Environment - Execute Weapon - Needle Spines (Hydralisk Damage) on (Triggering unit) from (Damaging unit)
@Nerfpl: Go
Ok. This makes it wait so it only fires once. I also switched the damaging effect to be a dummy effect with 0 damage. It was already doing double damage with having it be 0, cause it's a damage response.
Now the new issue: It's not *2 when the damage isn't a whole number. So if it's 1.5 it is erroring out trying to times that by 2. I have everything set to real so I don't see why that's an issue. Also the damage amount isn't adding the buffed damage the hero has. It is adding the upgraded damage you recieve from upgrades, but not the green () buffed damage.
Ok got everything working:
This deals double damage based on the % damage response on the weapon of the hero.
€ didn't read the whole thread, so my previous answer was not helpful.
But why don't you just deal normal damage, take the triggering damage amount and deal that amount of damage as additional damage?
@Kueken531: Go
I tried that. It didn't work :(
Or you create a Set Effect in data editor and add your normal Damage Effect + another Damage Effect, with whatever additional damage you want the critical strike to cause, with the %-to-hit value set to whatever chance you want it to hit ;)
EDIT: That would be another way to do it, I think... if I got this thread right :P
Use catalog value to define damage amount then make all necessary math and change current life of a victim. This approach will work fine, but you will need to change damage of the units with triggers too in this case(instead of behaviours), cuz u cant operate catalog values without issues (if you will change catalog value it will change damage effect to all unit that uses same weapon in this case, but i think you already know it)