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

Advanced system question about DamageEngineSystem

Level 17
Joined
Jun 2, 2009
Messages
1,141
Hello everyone. Is it possible to detect specific damage and use it as a condition at another triggers?


Example: Trigger 1. This trigger runs by another trigger when hero cast spells

Unit Group - Pick every unit in bla bla bla
Loop - Actions
Set TESTREAL = 100.00
Unit - Cause TempUnit to damage (Picked unit), dealing TESTREAL damage of attack type Spells and damage type Magic

And this is the secondary trigger. I am doing lot of calculations in here. But i want to "exclude" stored damage

Events
Game - DamageModifierEvent becomes Equal to 1.00
Conditions
IsDamageSpell Equal to True
IS DAMAGE NOT EQUAL TO TEST REAL

We can modify damage with this system. But still is it going to work if event is unit is attacked or unit starts the effect on ability instead of DamageModifierEvent becomes Equal to 1.00?

_____________________________________________________________________________________________________________________________________________________________________________________________________________

Here is the entire trigger if you need extra details

This trigger deals damage to enemy units around the caster. And i have a difficulty options that puts intelligence points as extra damage when AI casting spells. But the problem is, only one hero becames overpowered because of this spell

Field of Lightning Trigger

  • Events
  • Conditions
  • Actions
    • Unit Group - Pick every unit in FieldOfLightningCasterGroup and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Picked unit) is alive) Equal to True
            • (Level of Field of Lightning // for Hero_ThunderCaller) Greater than or equal to 1
          • Then - Actions
            • Set TempUnit = (Picked unit)
            • Set TempPoint = (Position of TempUnit)
            • Unit Group - Pick every unit in (Units within 800.00 of TempPoint matching ((((Matching unit) belongs to an enemy of (Owner of TempUnit)) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is a and do (Actions)
              • Loop - Actions
                • Set TempString = (String((10 + (10 x (Level of Field of Lightning // for TempUnit)))))
                • Floating Text - Create floating text that reads TempString at TempPoint with Z offset 0.00, using font size 10.00, color (0.00%, 50.00%, 100.00%), and 0.00% transparency
                • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
                • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
                • Floating Text - Change (Last created floating text): Disable permanence
                • Unit - Cause TempUnit to damage (Picked unit), dealing (10.00 + (10.00 x (Real((Level of Field of Lightning // for TempUnit))))) damage of attack type Spells and damage type Magic
                • Set TempPoint2 = (Position of (Picked unit))
                • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Orc\LightningShield\LightningShieldBuff.mdl
                • Special Effect - Destroy (Last created special effect)
                • Custom script: call RemoveLocation(udg_TempPoint2)
            • Custom script: call RemoveLocation(udg_TempPoint)
          • Else - Actions
I want to EXCLUDE damage done by Field of Lightning Trigger in here

  • BotExtraHasarInt
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to True
      • (DamageEventSource is in Herolar_Int) Equal to True
      • (DamageEventSource is in HerolarBotALL) Equal to True
      • (Level of DamageEventSource) Greater than or equal to 11
      • (DamageEventTarget is in NNN) Equal to True
    • Actions
      • Set DamageEventAmount = (DamageEventAmount + ((Real((Intelligence of DamageEventSource (Include bonuses)))) x 0.50))
 
Level 25
Joined
Sep 26, 2009
Messages
2,383
You can use a specific combination of attack type and damage type which you would always ignore in this trigger. For example attack type spells, damage type universal.

But since you are damaging unit via trigger, you can also use for example a hashtable and just save a boolean that would represent if the damage should be ignored or not. So you store a boolean value in hashtable, then deal damage and in the second trigger you load the boolean value from hashtable and check it.
 
Top