• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Import] Passive effects with triggers

Status
Not open for further replies.
Level 22
Joined
Aug 27, 2013
Messages
3,973
Go download Damage Engine here. Follow the instructions from the description to implement the system in your map correctly. Once you've done, Create a new trigger. Put "Game - DamageModifierEvent becomes Equal to 1.00" as an event. The condition should be something like "(Level of YourAbility for (DamageEventSource)) Greater than 0", this will check if the unit that causing damage has the ability. You can alter the damage that the caster dealt using "DamageEventAmount" variable.

I find it hard to explain it, it's much better if you just go ahead and try it. I'm sure you'll figure out how to use the damage engine properly. :)
Just ask if there is any part that you don't understand.
 
Level 5
Joined
Apr 3, 2015
Messages
104
Go download Damage Engine here. Follow the instructions from the description to implement the system in your map correctly. Once you've done, Create a new trigger. Put "Game - DamageModifierEvent becomes Equal to 1.00" as an event. The condition should be something like "(Level of YourAbility for (DamageEventSource)) Greater than 0", this will check if the unit that causing damage has the ability. You can alter the damage that the caster dealt using "DamageEventAmount" variable.

I find it hard to explain it, it's much better if you just go ahead and try it. I'm sure you'll figure out how to use the damage engine properly. :)
Just ask if there is any part that you don't understand.
isn't there any simplest solution? because i have a big problem with the "language barrier" :(
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
isn't there any simplest solution? because i have a big problem with the "language barrier" :(
I'm afraid not, because critical strike is hardcoded and you can't detect it.

How to Install:
  • Necessary: Copy & paste the Unit Indexer trigger into your map.
  • Necessary: Copy & paste the Damage Engine trigger into your map
  • Necessary: Copy the Cheat Death Ability from Object Editor, and set it to the variable DamageBlockingAbility.
  • Necessary: Copy the Spell Damage Detector Ability from Object Editor, and set it to the variable SpellDamageAbility.

I've placed the triggers that you need to copy in one folder. The trigger for your ability is the one named "Critical Damage". You may want to copy the "Custom Critical Strike" ability, "Critical Strike Stun" ability and "Dummy" from object editor first before copying the triggers. I've also put some comments in the trigger, I hope you can understand what it does and how to use it. :)
 

Attachments

  • Damage Engine v3.7.w3x
    51.2 KB · Views: 21
Hello, i want to make a ability when Unit A stuns Unit B with "Critical Strike" but the ability does damage to adjacent units every time "critical strike" is executed
Is this AoE Damage a % of the dealt damage or a fix value?
If it is an fixed value and this unit has no other ways to stun targets you can do something like this.
This trigger uses a "Stun-Event" and checks if the stunner has the krit skill.
  • AoE dmg on Krit with stun
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • Custom script: set udg_Id = GetIssuedOrderId()
      • -------- StunOrder + Source has the Krit with stun skil --------
      • -------- Target unit of issued order is the stunner--------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Id Equal to 851973
          • (Level of Krit skill for (Target unit of issued order)) Not equal to 0
        • Then - Actions
          • Set Source = (Target unit of issued order)
          • Set Loc = (Position of (Triggering unit))
          • Custom script: set bj_wantDestroyGroup =true
          • Unit Group - Pick every unit in (Units within 200.00 of Loc) and do (Actions)
            • Loop - Actions
              • Set Picked = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Picked Not equal to (Triggering unit)
                  • (Picked is A structure) Equal to False
                  • (Picked belongs to an enemy of (Owner of Source)) Equal to True
                  • (Picked is alive) Equal to True
                • Then - Actions
                  • Unit - Cause Source to damage Picked, dealing (20.00 x (Real((Level of Krit skill for Source)))) damage of attack type Spells and damage type Magic
                  • Special Effect - Create a special effect attached to the chest of Picked using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
          • Custom script: call RemoveLocation(udg_Loc)
        • Else - Actions
If your unit has other ways to stun units you have to make sure this happens only when attacking, for example save attack target on is attacked event by using unit indexer / hashtable.

When this AoE Damage should be a % of dealt dmg then you should stick to Damage Engine and use Rheiko's one.
 
Last edited:
Status
Not open for further replies.
Top