• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Warcraft 3 version and difference about 'take damage' and 'about take damage'

Is this possible in GUI?

I recommend replacing the code in the Test trigger (see the attached file in the thread by TriggerHappy) with this code:

JASS:
function Trig_Test_Actions takes nothing returns nothing
    local integer patch = GetPatchLevel()
   
    if (patch == PATCH_LEVEL_127) then
        set udg_PATCH_LEVEL_127 = true
    elseif (patch == PATCH_LEVEL_128) then
        set udg_PATCH_LEVEL_128 = true
    elseif (patch == PATCH_LEVEL_129) then
        set udg_PATCH_LEVEL_129 = true
    elseif (patch == PATCH_LEVEL_130) then
        set udg_PATCH_LEVEL_130 = true
    endif
   
    call DestroyTimer(GetExpiredTimer())
endfunction

//===========================================================================
function InitTrig_Test takes nothing returns nothing
    call TimerStart(CreateTimer(), 0.00, false, function Trig_Test_Actions)
endfunction

udg_PATCH_LEVEL_127, udg_PATCH_LEVEL_128, udg_PATCH_LEVEL_129 and udg_PATCH_LEVEL_130 are the global variables that must be created in the global variables editor so that they can be used in other triggers.

*Remember to remove the prefixes udg_ before creating these variables in the global variables editor.
 
Also what difference about 'take damage' and 'about take damage'
"About to take damage" => raw damage unit received
"Takes damage" => final damage unit will receive (after all modifiers were applied)

For example you cast Firebolt that deals 100 damage on a hero. Due to 'Hero' armor, spell damage taken is reduced by 30%
Events will show this damage taken:
  • About to take damage: 100
  • Takes damage: 70 (= 100 * (1.0 - 0.3))
 
"About to take damage" => raw damage unit received
"Takes damage" => final damage unit will receive (after all modifiers were applied)

For example you cast Firebolt that deals 100 damage on a hero. Due to 'Hero' armor, spell damage taken is reduced by 30%
Events will show this damage taken:
  • About to take damage: 100
  • Takes damage: 70 (= 100 * (1.0 - 0.3))
So basically like bribe Pre-Damage event?
 
Back
Top