• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] What!?!?!?!

Status
Not open for further replies.
Level 4
Joined
Sep 14, 2011
Messages
47
Hey WE professionals. THIS trigger is doing something weird and I'm at a loss as to why. This trigger deals temporary strength damage to a unit or kills it instantly if its strength runs out.

I've used a locally declared global at the start (tInt), which I set to a number (always between 1 and 5) which represents the amount of STR damage about to be dealt. Then, if the target unit who is about to take damage has strength greater than this amount, it loses strength as per the first part of the trigger in the "Then" portion. Alternately, (Else) if it has equal or less strength remaining, it dies instantly. The problem is that units are dying with more than enough STR remaining. This (2nd Else part) of the trigger SHOULD NOT be running if there is sufficient STR left (which the game text demonstrates as true)!

Any help would be greatly appreciated. +REP

  • Avatar Big Ult DL
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • GDD_DamageSource Equal to avUnit[avDL]
      • (GDD_DamagedUnit has an item of type |cff4169e1Kraken Armor|r) Equal to False
      • (GDD_DamagedUnit is A Hero) Equal to True
    • Actions
      • Custom script: local integer udg_tInt = udg_avBigUlt_DL_CurrentStrDrain
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Strength of GDD_DamagedUnit (Exclude bonuses)) Greater than tInt
        • Then - Actions
          • Hero - Modify Strength of (Triggering unit): Subtract tInt
          • Hero - Modify Strength of avUnit[avDL]: Add tInt
          • Wait 20.00 seconds
          • Hero - Modify Strength of (Triggering unit): Add tInt
          • Hero - Modify Strength of avUnit[avDL]: Subtract tInt
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • avDebug Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: (Dreadlord blowing up + ((Name of GDD_DamagedUnit) + ( by dealing + ((String(tInt)) + ( STR dmg to + ((Name of GDD_DamagedUnit) + ( with STR: + (String((Strength of GDD_DamagedUnit (Exclude bonuses)))))))))))
            • Else - Actions
          • Unit - Set the custom value of GDD_DamagedUnit to -1
          • Trigger - Turn off (This trigger)
          • Unit - Cause GDD_DamageSource to damage (Triggering unit), dealing 500000.00 damage of attack type Normal and damage type Normal
          • Trigger - Turn on (This trigger)
          • Set tPoint = (Position of (Triggering unit))
          • Set tReal = (avBigUlt_DL_StrDmgMult x (Real((Strength of avUnit[avDL] (Include bonuses)))))
          • Custom script: set bj_wantDestroyGroup = true
          • Trigger - Turn off (This trigger)
          • Unit Group - Pick every unit in (Units within avBigUlt_Lich_BoomAOE of tPoint matching ((((Matching unit) belongs to an enemy of PlayerAvatars) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is Magic Immune) Equal to False)))) and do (Actions)
            • Loop - Actions
              • Unit - Cause avUnit[avDL] to damage (Picked unit), dealing tReal damage of attack type Normal and damage type Force
          • Trigger - Turn on (This trigger)
 
Status
Not open for further replies.
Top