[Spell] Shockwave with Extra Percentage Damage

Level 13
Joined
Sep 11, 2013
Messages
467
Greetings!

Few years ago I found this Advanced Shockwave created by [Paladon] and since then, I've made few little changes on the spell and all was good.

Right now I need your help because I want to make this spell (through trigger) to deal extra 10% Percentage Damage of max hp of the enemy beside the shockwave normal damage , but I have no idea how.. The extra 10% damage must hit the enemy target only once/spell just like a normal shockwave damage.

Example:
If the enemy has 1000 hp and the normal shockwave damage will deal 400 damage and the trigger will deal extra 10% damage of max hp of the enemy that will be equal with..
1000 - 400 - 100(10% of 1000)= 500 hp

Example2:
If the enemy has 900 hp and the normal shockwave damage will deal 100 damage and the trigger will deal extra 10% damage of max hp of the enemy that will be equal with..
900 - 100 - 90(10% of 900) = 710 hp

I don't know if that is possible, but I wish the base spell to remain Shockwave as it is now.

I have attached the map below because there are way too many triggers to post here..

The help will be appreciated! :peasant-bowing:
 

Attachments

  • Shockwave Percentage Damage.w3m
    47.2 KB · Views: 3

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Just about anything is possible as long you remain within the limitations of the Warcraft 3 engine.

Understand that there's no other way to deal damage in triggers without using this Action:
  • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 500.00 damage of attack type Spells and damage type Normal
So find the line in your triggers that deals damage and modify it to also do this:
  • Set Variable NewReal = (Max life of Unit_Taking_Damage x 0.10)
  • Unit - Cause Unit_Dealing_Damage to damage Unit_Taking_Damage, dealing (Normal_Damage + NewReal) of attack type...

Also, Paladon's stuff is pretty old and likely outdated, here's some newer Shockwaves:
+ I attached one I made which uses Special Effects and Dynamic Indexing. No Dummy unit required, as modern as you can get ;)
 

Attachments

  • Custom Shockwave Fixed1.w3x
    25.6 KB · Views: 3
Last edited:
Level 13
Joined
Sep 11, 2013
Messages
467
Just about anything is possible as long you remain within the limitations of the Warcraft 3 engine.

Understand that there's no other way to deal damage in triggers without using this Action:
  • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 500.00 damage of attack type Spells and damage type Normal
So find the line in your triggers that deals damage and modify it to also do this:
  • Set Variable NewReal = (Max life of Unit_Taking_Damage x 0.10)
  • Unit - Cause Unit_Dealing_Damage to damage Unit_Taking_Damage, dealing (Normal_Damage + NewReal) of attack type...

Also, Paladon's stuff is pretty old and likely outdated, here's some newer Shockwaves:
+ I attached one I made which uses Special Effects and Dynamic Indexing. No Dummy unit required, as modern as you can get ;)
Hi @Uncle and thank you again for your outstanding help!:peasant-waving:

I appreciate your effort very much, but sadly, there are few problems here.. at least from my point of view..

It will be difficult for me to type so much text because I am not a native speaker of english:peasant-sad:

1. I saw both new maps and I understand that there is no other way in this situation to deal extra damage other than with fast timers.
That's very good I suppose, but only if we manage to synchronize perfect the effect from the real Shockwave with the damage of the timers from triggers, but here is the first problem..

We don't have the real Shockwave anymore as base spell...
(I don't like how Shockwave/Carrion Swarm System v1.1 works) so, right now I will talk about your map :peasant-shocked:
I don't know if that is possible, but I wish the base spell to remain Shockwave as it is now.
Your map seems to do the trick with extra damage :peasant-thumbs-up: I edited what you told me to do and seems to work.
  • Then - Actions
    • Set VariableSet SW_NewReal = ((Max life of SW_Target) x 0.50)
    • Unit Group - Add SW_Target to SW_HitGroup[SW_Loop]
    • Unit - Cause SW_Caster[SW_Loop] to damage SW_Target, dealing (SW_Damage[SW_Loop] + SW_NewReal) damage of attack type SW_AttackType[SW_Loop] and damage type SW_DamageType[SW_Loop]
But.. the artificial special effects of shockwave is very unnatural for me.. so..
I don't understand why the base ability is not the real Shockwave in your map..
The real Shockwave have better visuals (terrain deformation and looks natural). :peasant-confused:
Also, In the Paladon Advanced Shockwave I had an entire working knockback system + other nice effects for shockwave.

The problem is that I have no idea how to combine your system with Paladon Advanced Shockwave. This will be the best solution for me because the Paladon Shockwave is very natural and has other nice effects + knockback system and your trigger is perfect to do extra damage in percentage if is corect integrated.

Yeah, maybe Paladon system is old and outdated, but it works and my premise in life is. "If it ain't broke, don't fix it.":peasant-thinking:

The missile of the real shockwave has 1050 movement speed and has 125 AOE I think.

It would be perfect if you could help me to combine those 2 systems.

The map is still in the first post:peasant-bowing:
 
Level 13
Joined
Sep 11, 2013
Messages
467
Just use the Paladon system if it works.
I think that there was a misunderstanding somewhere.. sorry about that..

I try to explain better now

Paladon system it is created only for special effects and doesn't do damage at all.
  • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 500.00 damage of attack type Spells and damage type Normal
There is no such trigger in Paladon.. ^
---------------------------------------------------

Because Paladon system has the Real shockwave as Base Spell and other special effects + knockback system, the only part that is missing from here is your trigger (from the new map that you just created above) that create the Percentage Damage.

So the question is.. (If is possible) How can I put your trigger with Percentage Damage optimally in the Paladon system (without breaking something)?

"If it ain't broke, don't fix it.":peasant-thinking:
Also, when I said that quote, I was referring to the special effects in that case. In Paladon spell, the special effects were good and, for the moment, I don't wish to delete/replace them, so, I only need to work on the part with the Percentage Damage.:peasant-smile:

The help will be appreciated!:peasant-bowing:
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Paladon probably relies on a Damage Event somewhere, in which case you can modify the damage dealt. Either way, when it applies a knockback it's "hitting a unit", so somewhere there is a place for the bonus damage Action.
 
Last edited:
Level 13
Joined
Sep 11, 2013
Messages
467
Paladon probably relies on a Damage Event somewhere, in which case you can modify the damage dealt. Either way, when it applies a knockback it's "hitting a unit", so somewhere there is a place for the bonus damage Action.
Well... I have no idea what am I doing here..

I inserted those 2 lines where arrow appear "<-----" , but this will kill units very fast because there are so many instances created on the same unit and also some units receve more damage than others and seems buggy.. I have no idea how to fix that:peasant-work-work:


  • Get Knockback
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer KB_GeneralIntegers[1]) from 1 to KB_TotalKnockUnits, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (KB_Units[KB_GeneralIntegers[1]] is in KB_KnockbackedUnits.) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KB_ReachedDistance[KB_GeneralIntegers[1]] Greater than or equal to KB_MaxDistance[KB_GeneralIntegers[1]]
                • Then - Actions
                  • Unit Group - Remove KB_Units[KB_GeneralIntegers[1]] from KB_KnockbackedUnits.
                  • Set VariableSet KB_CountBuffs = (KB_CountBuffs - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • KB_TotalKnockUnits Greater than KB_GeneralIntegers[1]
                    • Then - Actions
                      • Set VariableSet KB_Levels[KB_GeneralIntegers[1]] = KB_Levels[KB_TotalKnockUnits]
                      • Set VariableSet KB_Units[KB_GeneralIntegers[1]] = KB_Units[KB_TotalKnockUnits]
                      • Set VariableSet KB_Angle[KB_GeneralIntegers[1]] = KB_Angle[KB_TotalKnockUnits]
                      • Set VariableSet KB_MaxDistance[KB_GeneralIntegers[1]] = KB_MaxDistance[KB_TotalKnockUnits]
                      • Set VariableSet KB_ReachedDistance[KB_GeneralIntegers[1]] = KB_ReachedDistance[KB_TotalKnockUnits]
                      • Set VariableSet KB_ReduceSpeedReal[KB_GeneralIntegers[1]] = KB_ReduceSpeedReal[KB_TotalKnockUnits]
                      • Set VariableSet KB_SpecificSpeed[KB_GeneralIntegers[1]] = KB_SpecificSpeed[KB_TotalKnockUnits]
                      • Set VariableSet KB_Effects_1[KB_GeneralIntegers[1]] = KB_Effects_1[KB_TotalKnockUnits]
                      • Set VariableSet KB_Effects_2[KB_GeneralIntegers[1]] = KB_Effects_2[KB_TotalKnockUnits]
                      • Set VariableSet KB_DestroyTrees[KB_GeneralIntegers[1]] = KB_DestroyTrees[KB_TotalKnockUnits]
                      • Set VariableSet KB_EffectCounter[KB_GeneralIntegers[1]] = KB_EffectCounter[KB_TotalKnockUnits]
                      • Set VariableSet KB_EffectCounter2[KB_GeneralIntegers[1]] = KB_EffectCounter2[KB_TotalKnockUnits]
                      • Set VariableSet KB_GeneralIntegers[1] = (KB_GeneralIntegers[1] - 1)
                    • Else - Actions
                  • Set VariableSet KB_Units[KB_TotalKnockUnits] = No unit
                  • Set VariableSet KB_TotalKnockUnits = (KB_TotalKnockUnits - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • KB_CountBuffs Equal to 0
                    • Then - Actions
                      • Set VariableSet KB_TotalKnockUnits = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
                  • Set VariableSet KB_ReducedReal = ((KB_SpecificSpeed[KB_GeneralIntegers[1]] / KB_MaxDistance[KB_GeneralIntegers[1]]) x KB_ReachedDistance[KB_GeneralIntegers[1]])
                  • Set VariableSet KB_ReduceSpeedReal[KB_GeneralIntegers[1]] = (KB_ReducedReal - (KB_ReduceSpeedReal[KB_GeneralIntegers[1]] x 0.10))
                  • Set VariableSet KB_TempReal = ((KB_SpecificSpeed[KB_GeneralIntegers[1]] - KB_ReduceSpeedReal[KB_GeneralIntegers[1]]) x 2.00)
                  • Set VariableSet KB_TempPoint[1] = (Position of KB_Units[KB_GeneralIntegers[1]])
                  • Set VariableSet KB_TempPoint[2] = (KB_TempPoint[1] offset by KB_TempReal towards KB_Angle[KB_GeneralIntegers[1]] degrees.)
                  • Set VariableSet KB_EffectCounter[KB_GeneralIntegers[1]] = (KB_EffectCounter[KB_GeneralIntegers[1]] + 1)
                  • Set VariableSet KB_EffectCounter2[KB_GeneralIntegers[1]] = (KB_EffectCounter2[KB_GeneralIntegers[1]] + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • KB_DestroyTrees[KB_GeneralIntegers[1]] Equal to True
                    • Then - Actions
                      • Set VariableSet SW_NewReal = ((Max life of KBA_TargetUnit) x 0.05) <-----------------------------------------------------------------------------------------------------------------------
                      • Unit - Cause KBA_Caster to damage KBA_TargetUnit, dealing SW_NewReal damage of attack type Spells and damage type Magic <-------------------------------------------------
                      • Destructible - Pick every destructible within 200.00 of KB_TempPoint[2] and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Destructible-type of (Picked destructible)) Not equal to Pathing Blocker (Ground)
                              • (Destructible-type of (Picked destructible)) Not equal to Pathing Blocker (Ground) (Large)
                              • (Destructible-type of (Picked destructible)) Not equal to Ice Rock Gate (Horizontal)
                              • (Destructible-type of (Picked destructible)) Not equal to Ice Rock Gate (Vertical)
                            • Then - Actions
                              • Destructible - Kill (Picked destructible)
                            • Else - Actions
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • KB_EffectCounter[KB_GeneralIntegers[1]] Equal to 6
                    • Then - Actions
                      • Set VariableSet KB_EffectCounter[KB_GeneralIntegers[1]] = 0
                      • Special Effect - Create a special effect at KB_TempPoint[1] using KB_Effects_1[KB_GeneralIntegers[1]]
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • KB_EffectCounter2[KB_GeneralIntegers[1]] Equal to 8
                    • Then - Actions
                      • Set VariableSet KB_EffectCounter2[KB_GeneralIntegers[1]] = 0
                      • Special Effect - Create a special effect at KB_TempPoint[1] using KB_Effects_2[KB_GeneralIntegers[1]]
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                  • Unit - Move KB_Units[KB_GeneralIntegers[1]] instantly to KB_TempPoint[2]
                  • Custom script: call RemoveLocation (udg_KB_TempPoint[1])
                  • Custom script: call RemoveLocation (udg_KB_TempPoint[2])
                  • Set VariableSet KB_ReachedDistance[KB_GeneralIntegers[1]] = (KB_ReachedDistance[KB_GeneralIntegers[1]] + KB_TempReal)
            • Else - Actions
 
Level 13
Joined
Sep 11, 2013
Messages
467
That trigger is for moving units / destroying trees periodically, find the trigger that registers the units in the first place and deal the damage then.
yeah.. :peasant-work-work:..sorry..
I tried few tests alone, but there is no hope for me to fix this problem alone..
This hobby of troubleshooting triggers is not for noobs like me.
I just wish to see this working as i wished and nothing more..

Maybe should I copy your entire trigger (without special effects) in Paladon trigger and maybe this will work, but is not optimally..
Idk..
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
yeah.. :peasant-work-work:..sorry..
I tried few tests alone, but there is no hope for me to fix this problem alone..
This hobby of troubleshooting triggers is not for noobs like me.
I just wish to see this working as i wished and nothing more..

Maybe should I copy your entire trigger (without special effects) in Paladon trigger and maybe this will work, but is not optimally..
Idk..
There's two triggers, Cast A Knockback and Get Knockback. If you know that Get Knockback isn't the correct one since it handles periodic movement, then surely Cast A Knockback is where you would apply or "register" a knockback. Let's take a look:
  • Cast A Knockback
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (KBA_TargetUnit is in KB_KnockbackedUnits.) Equal to True
        • Then - Actions
          • Unit Group - Remove KBA_TargetUnit from KB_KnockbackedUnits.
          • Set VariableSet KB_CountBuffs = (KB_CountBuffs - 1)
          • For each (Integer KB_GeneralIntegers[2]) from 1 to KB_TotalKnockUnits, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KB_Units[KB_GeneralIntegers[1]] Equal to KBA_TargetUnit
                • Then - Actions
                  • Set VariableSet KB_GeneralIntegers[1] = KB_GeneralIntegers[2]
                  • Set VariableSet KB_GeneralIntegers[2] = KB_TotalKnockUnits
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KB_TotalKnockUnits Greater than KB_GeneralIntegers[1]
            • Then - Actions
              • Set VariableSet KB_Levels[KB_GeneralIntegers[1]] = KB_Levels[KB_TotalKnockUnits]
              • Set VariableSet KB_Units[KB_GeneralIntegers[1]] = KB_Units[KB_TotalKnockUnits]
              • Set VariableSet KB_Angle[KB_GeneralIntegers[1]] = KB_Angle[KB_TotalKnockUnits]
              • Set VariableSet KB_MaxDistance[KB_GeneralIntegers[1]] = KB_MaxDistance[KB_TotalKnockUnits]
              • Set VariableSet KB_ReachedDistance[KB_GeneralIntegers[1]] = KB_ReachedDistance[KB_TotalKnockUnits]
              • Set VariableSet KB_ReduceSpeedReal[KB_GeneralIntegers[1]] = KB_ReduceSpeedReal[KB_TotalKnockUnits]
              • Set VariableSet KB_SpecificSpeed[KB_GeneralIntegers[1]] = KB_SpecificSpeed[KB_TotalKnockUnits]
              • Set VariableSet KB_Effects_1[KB_GeneralIntegers[1]] = KB_Effects_1[KB_TotalKnockUnits]
              • Set VariableSet KB_Effects_2[KB_GeneralIntegers[1]] = KB_Effects_2[KB_TotalKnockUnits]
              • Set VariableSet KB_DestroyTrees[KB_GeneralIntegers[1]] = KB_DestroyTrees[KB_TotalKnockUnits]
              • Set VariableSet KB_EffectCounter[KB_GeneralIntegers[1]] = KB_EffectCounter[KB_TotalKnockUnits]
              • Set VariableSet KB_EffectCounter2[KB_GeneralIntegers[1]] = KB_EffectCounter2[KB_TotalKnockUnits]
              • Set VariableSet KB_GeneralIntegers[1] = (KB_GeneralIntegers[1] - 1)
            • Else - Actions
          • Set VariableSet KB_Units[KB_TotalKnockUnits] = No unit
          • Set VariableSet KB_TotalKnockUnits = (KB_TotalKnockUnits - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KB_CountBuffs Equal to 0
            • Then - Actions
              • Set VariableSet KB_TotalKnockUnits = 0
              • Trigger - Turn off Get Knockback <gen>
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KB_CountBuffs Equal to 0
        • Then - Actions
          • Trigger - Turn on Get Knockback <gen>
        • Else - Actions
      • Set VariableSet KB_CountBuffs = (KB_CountBuffs + 1)
      • Set VariableSet KB_TotalKnockUnits = (KB_TotalKnockUnits + 1)
      • Set VariableSet KB_Casters[KB_TotalKnockUnits] = KBA_Caster
      • Set VariableSet KB_Levels[KB_TotalKnockUnits] = KBA_Level
      • Set VariableSet KB_Units[KB_TotalKnockUnits] = KBA_TargetUnit
      • Set VariableSet KB_StartPositions[KB_TotalKnockUnits] = KBA_StartingPosition
      • Set VariableSet KB_TempPoint[KB_TotalKnockUnits] = (Position of KBA_TargetUnit)
      • Set VariableSet KB_Angle[KB_TotalKnockUnits] = (Angle from KB_StartPositions[KB_TotalKnockUnits] to KB_TempPoint[KB_TotalKnockUnits])
      • Set VariableSet KB_MaxDistance[KB_TotalKnockUnits] = (KBA_DistancePerLevel x (Real(KBA_Level)))
      • Set VariableSet KB_ReachedDistance[KB_TotalKnockUnits] = 0.00
      • Set VariableSet KB_ReduceSpeedReal[KB_GeneralIntegers[1]] = 0.00
      • Set VariableSet KB_SpecificSpeed[KB_TotalKnockUnits] = KBA_Speed
      • Set VariableSet KB_Effects_1[KB_TotalKnockUnits] = KBA_SpecialEffects[1]
      • Set VariableSet KB_Effects_2[KB_TotalKnockUnits] = KBA_SpecialEffects[2]
      • Set VariableSet KB_DestroyTrees[KB_TotalKnockUnits] = KBA_DestroyTrees
      • Set VariableSet KB_EffectCounter[KB_GeneralIntegers[1]] = 0
      • Set VariableSet KB_EffectCounter2[KB_GeneralIntegers[1]] = 0
      • Unit Group - Add KBA_TargetUnit to KB_KnockbackedUnits <------------------- KBA_TargetUnit is the enemy that got hit, KBA_Caster is the caster
      • Custom script: call RemoveLocation (udg_KBA_StartingPosition)
      • Custom script: call RemoveLocation (udg_KB_TempPoint [udg_KB_TotalKnockUnits] )
      • Custom script: call RemoveLocation (udg_KB_StartPositions [udg_KB_TotalKnockUnits] )
When you look at that trigger does any Action catch your eye that would signify that a unit is now getting knockbacked? Remember, these triggers aren't magic, there's only two ways of interacting with multiple units at once, either with a Unit Group or a Unit array. In this case it appears that the creator used both.

That being said, I can't promise that dealing damage here will work perfectly.
 
Last edited:
Level 13
Joined
Sep 11, 2013
Messages
467
There's two triggers, Cast A Knockback and Get Knockback. If you know that Get Knockback isn't correct since it simply handles periodic movement, then surely Cast A Knockback is how you apply or "register" one?
  • Cast A Knockback
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (KBA_TargetUnit is in KB_KnockbackedUnits.) Equal to True
        • Then - Actions
          • Unit Group - Remove KBA_TargetUnit from KB_KnockbackedUnits.
          • Set VariableSet KB_CountBuffs = (KB_CountBuffs - 1)
          • For each (Integer KB_GeneralIntegers[2]) from 1 to KB_TotalKnockUnits, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KB_Units[KB_GeneralIntegers[1]] Equal to KBA_TargetUnit
                • Then - Actions
                  • Set VariableSet KB_GeneralIntegers[1] = KB_GeneralIntegers[2]
                  • Set VariableSet KB_GeneralIntegers[2] = KB_TotalKnockUnits
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KB_TotalKnockUnits Greater than KB_GeneralIntegers[1]
            • Then - Actions
              • Set VariableSet KB_Levels[KB_GeneralIntegers[1]] = KB_Levels[KB_TotalKnockUnits]
              • Set VariableSet KB_Units[KB_GeneralIntegers[1]] = KB_Units[KB_TotalKnockUnits]
              • Set VariableSet KB_Angle[KB_GeneralIntegers[1]] = KB_Angle[KB_TotalKnockUnits]
              • Set VariableSet KB_MaxDistance[KB_GeneralIntegers[1]] = KB_MaxDistance[KB_TotalKnockUnits]
              • Set VariableSet KB_ReachedDistance[KB_GeneralIntegers[1]] = KB_ReachedDistance[KB_TotalKnockUnits]
              • Set VariableSet KB_ReduceSpeedReal[KB_GeneralIntegers[1]] = KB_ReduceSpeedReal[KB_TotalKnockUnits]
              • Set VariableSet KB_SpecificSpeed[KB_GeneralIntegers[1]] = KB_SpecificSpeed[KB_TotalKnockUnits]
              • Set VariableSet KB_Effects_1[KB_GeneralIntegers[1]] = KB_Effects_1[KB_TotalKnockUnits]
              • Set VariableSet KB_Effects_2[KB_GeneralIntegers[1]] = KB_Effects_2[KB_TotalKnockUnits]
              • Set VariableSet KB_DestroyTrees[KB_GeneralIntegers[1]] = KB_DestroyTrees[KB_TotalKnockUnits]
              • Set VariableSet KB_EffectCounter[KB_GeneralIntegers[1]] = KB_EffectCounter[KB_TotalKnockUnits]
              • Set VariableSet KB_EffectCounter2[KB_GeneralIntegers[1]] = KB_EffectCounter2[KB_TotalKnockUnits]
              • Set VariableSet KB_GeneralIntegers[1] = (KB_GeneralIntegers[1] - 1)
            • Else - Actions
          • Set VariableSet KB_Units[KB_TotalKnockUnits] = No unit
          • Set VariableSet KB_TotalKnockUnits = (KB_TotalKnockUnits - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KB_CountBuffs Equal to 0
            • Then - Actions
              • Set VariableSet KB_TotalKnockUnits = 0
              • Trigger - Turn off Get Knockback <gen>
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KB_CountBuffs Equal to 0
        • Then - Actions
          • Trigger - Turn on Get Knockback <gen>
        • Else - Actions
      • Set VariableSet KB_CountBuffs = (KB_CountBuffs + 1)
      • Set VariableSet KB_TotalKnockUnits = (KB_TotalKnockUnits + 1)
      • Set VariableSet KB_Casters[KB_TotalKnockUnits] = KBA_Caster
      • Set VariableSet KB_Levels[KB_TotalKnockUnits] = KBA_Level
      • Set VariableSet KB_Units[KB_TotalKnockUnits] = KBA_TargetUnit
      • Set VariableSet KB_StartPositions[KB_TotalKnockUnits] = KBA_StartingPosition
      • Set VariableSet KB_TempPoint[KB_TotalKnockUnits] = (Position of KBA_TargetUnit)
      • Set VariableSet KB_Angle[KB_TotalKnockUnits] = (Angle from KB_StartPositions[KB_TotalKnockUnits] to KB_TempPoint[KB_TotalKnockUnits])
      • Set VariableSet KB_MaxDistance[KB_TotalKnockUnits] = (KBA_DistancePerLevel x (Real(KBA_Level)))
      • Set VariableSet KB_ReachedDistance[KB_TotalKnockUnits] = 0.00
      • Set VariableSet KB_ReduceSpeedReal[KB_GeneralIntegers[1]] = 0.00
      • Set VariableSet KB_SpecificSpeed[KB_TotalKnockUnits] = KBA_Speed
      • Set VariableSet KB_Effects_1[KB_TotalKnockUnits] = KBA_SpecialEffects[1]
      • Set VariableSet KB_Effects_2[KB_TotalKnockUnits] = KBA_SpecialEffects[2]
      • Set VariableSet KB_DestroyTrees[KB_TotalKnockUnits] = KBA_DestroyTrees
      • Set VariableSet KB_EffectCounter[KB_GeneralIntegers[1]] = 0
      • Set VariableSet KB_EffectCounter2[KB_GeneralIntegers[1]] = 0
      • Unit Group - Add KBA_TargetUnit to KB_KnockbackedUnits <------------------- KBA_TargetUnit is the enemy that got hit, KBA_Caster is the caster
      • Custom script: call RemoveLocation (udg_KBA_StartingPosition)
      • Custom script: call RemoveLocation (udg_KB_TempPoint [udg_KB_TotalKnockUnits] )
      • Custom script: call RemoveLocation (udg_KB_StartPositions [udg_KB_TotalKnockUnits] )
When you look at that trigger does any Action catch your eye that would signify that the target unit is now getting knockbacked? Remember, these triggers aren't magic, there's two ways of interacting with multiple units, either with a Unit Group or a Unit array. In this case it appears that the creator used both.

That being said, I can't promise that this will work perfectly.
Thank you very much @Uncle! Seems to work very good!:peasant-thumbs-up-cheers:

I just inserted this trigger after that trigger that you marked for me with an arrow in your post.
  • Unit Group - Add KBA_TargetUnit to KB_KnockbackedUnits
  • Set VariableSet SW_NewReal = ((Max life of KBA_TargetUnit) x 0.50)
  • Unit - Cause KBA_Caster to damage KBA_TargetUnit, dealing SW_NewReal damage of attack type Spells and damage type Magic
New Problem..
I still think I need to implement your trigger in this trigger optimally somehow (without special effects) because this Paladon trigger Is not MUI.. Or is just bugged as you can see in the video below... :peasant-sad:


The second spell kill all units instantly if is casted at the same time with the first spell.. and I don't wish that..

If you know a better solution to solve this problem, the help will be always appreciated!:peasant-bowing:
 
Level 13
Joined
Sep 11, 2013
Messages
467
Are you sure it is not because of the accumulated damage?
What I am sure is that is 100% a bug/problem for me. I tested even with 0.05 damage and the second shockwave will deal 8 to 10 times more damage (as long as is casted at the same time with the first shockwave in other direction..


EDIT: I've just realize that I want to delete the knockback system from Paladon spell because is not good for my new map.. But here is some few problems that I wish to solve with your help (because I have no idea how to do that and I tried and i failed miserably).. and.. Even if I succeeded, it probably wan't be optimal and I would leave a lot of leaks and bugs behind.. :peasant-sad:


What I wish to change/delete..

1. I wish to delete the knockback system optimally.

2. If I delete the knockback system, where should I put those 2 triggers that deal Extra Percentage Damage?
  • Set VariableSet SW_NewReal = ((Max life of KBA_TargetUnit) x 0.50)
  • Unit - Cause KBA_Caster to damage KBA_TargetUnit, dealing SW_NewReal damage of attack type Spells and damage type Magic

3. I wish to fix that bug with Extra Percentage Damage that appear in the video that I posted here. I think this spell is just Half MUI...
Also, I wish that the Extra Percentage Damage to hit even Buildings, not just Units.


Please help me to fix all those problems :peasant-bowing:


What I wish to remain unchanged..

1. This custom shockwave create a DUST trail (special effect) when I cast the spell and I like that.
I think this effect is created in Shockwave3 - trigger.
  • Set VariableSet JD_Counter[JD_Integers[3]] = (JD_Counter[JD_Integers[3]] + 1.00)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • JD_Counter[JD_Integers[3]] Greater than or equal to 5.00
    • Then - Actions
      • Set VariableSet JD_Counter[JD_Integers[3]] = 0.00
      • Special Effect - Create a special effect at JD_TempPoint[2] using JD_Effect[JD_Integers[3]]
      • Special Effect - Destroy (Last created special effect)
    • Else - Actions

2. In Shockwave3 - trigger, there is this trigger hit/destroy the trees and I want to keep that because I like the effect. (i prefer to keep the hit animation) but maybe in the future I switch to destroy the trees.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • JD_TreesDestroy[JD_Integers[3]] Equal to True
    • Then - Actions
      • Destructible - Pick every destructible within 150.00 of JD_TempPoint[2] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Not equal to Pathing Blocker (Ground)
              • (Destructible-type of (Picked destructible)) Not equal to Pathing Blocker (Ground) (Large)
              • (Destructible-type of (Picked destructible)) Not equal to Ice Rock Gate (Horizontal)
              • (Destructible-type of (Picked destructible)) Not equal to Ice Rock Gate (Vertical)
              • ((Picked destructible) is alive) Equal to True
            • Then - Actions
              • Animation - Play (Picked destructible)'s hit animation
            • Else - Actions
    • Else - Actions
The help will be appreciated! :peasant-bowing:
 

Attachments

  • Shockwave Percentage Damage BUG.w3m
    49.9 KB · Views: 1
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
I've offered you some working solutions, I don't fully understand what you don't like about them but I imagine you could tweak them to behave closer to what you expect. IE: Terrain deformation can be triggered if that's something you wanted. You could probably even delete the real Shockwave Missile - Art and rely on it's terrain deformation, assuming it still produces it without Art. You'd just need to spend a few minutes syncing the Speed properties since they use different math.

If you really insist on having the original ability then you could have a unique Dummy unit cast the real Shockwave. Then detect the Damage event from said Dummy and Set the Damage to 0 and have the the caster deal the damage instead - which can be done by linking the Dummy to the Caster at the time of creation via Unit Indexing. Then use a Knockback system at the time of dealing the redirected damage to launch the target away (there's a few on Hive that are easy to use). I've created and posted many custom spells that have triggered knockbacks you could use, just google "Hiveworkshop Uncle knockback".
 
Last edited:
Level 13
Joined
Sep 11, 2013
Messages
467
I've offered you some working solutions, I don't fully understand what you don't like about them but I imagine you could tweak them to behave closer to what you expect. IE: Terrain deformation can be triggered if that's something you wanted. You could probably even delete the real Shockwave Missile - Art and rely on it's terrain deformation, assuming it still produces it without Art. You'd just need to spend a few minutes syncing the Speed properties since they use different math.

If you really insist on having the original ability then you could have a unique Dummy unit cast the real Shockwave. Then detect the Damage event from said Dummy and Set the Damage to 0 and have the the caster deal the damage instead - which can be done by linking the Dummy to the Caster at the time of creation via Unit Indexing. Then use a Knockback system at the time of dealing the redirected damage to launch the target away (there's a few on Hive that are easy to use). I've created and posted many custom spells that have triggered knockbacks you could use, just google "Hiveworkshop Uncle knockback".
Thank you again! Fortunately, the problem is now solved! :peasant-thumbs-up-cheers:
 
Top