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

damage engine broken

Status
Not open for further replies.
Level 6
Joined
Aug 5, 2015
Messages
202
this http://www.hiveworkshop.com/forums/spells-569/gui-damage-engine-v3-5-0-0-a-201016/

i intent to making if i hit certain unit, its only take 10 damage per hit the trigger should be like this

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of DamageEventTarget) Equal to Iron Roots
    • Then - Actions
      • Set DamageEventAmount = (10.00 + (DamageEventAmount - DamageEventAmount))
    • Else - Actions
but the 1st hit and 2nd hit the dmg not reduced, its reduced after 3rd hit
why is that
 
Level 12
Joined
May 22, 2015
Messages
1,051
(DamageEventAmount - DamageEventAmount) will always be 0. Just do:
Set DamageEventAmount = 10.00

I don't know why it would only start working on the 3rd hit though. What does the rest of the trigger look like?
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,456
Please post the relevant triggers so we know what else is going on. Setting DamageEventAmount to 10 will usually be enough, but if you have other DamageModifier events messing with that variable, too, then you're going to get mixed results. You can either use DamageEventOverride along with conditions on each trigger to assess if it is true or false, or simply use DamageModifierEvent Equal to 3.00 as the event instead of 1.00, as that will ensure that your trigger is undisturbed by other modification triggers.
 
Level 6
Joined
Aug 5, 2015
Messages
202
no its wont work, i dont know why we must not set the damage not too low
i already test at least we need set the damage 50 or 100 its work
1 or 10 or 20 wont work i dont know why
i still dont understand DamageEventOverride mechanics

i mean its weird, like phoenix ultimate dota
he can make 1 hit = 1 dmg to the egg

@saus: its the only trigger
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,456
so i should turn override on from now on for all damage modifier trigger?

Situationally.

Let's say you have 3 triggers that change the damage.

Trigger 1: Set damage to 0
Trigger 2: Multiply damage by 3
Trigger 3: Set damage to 10

If you set the damage directly instead of multiply or divide it, you COULD set DamageEventOverride to true, and in other triggers include the condition "DamageEventOverride Equal to false". BUT, I don't know what your triggers look like.

www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/

Please include all triggers that set DamageEventAmount. If there are lots, you can send me a private message with the map in it.
 
Having a little problem with newest Damage Engine. I'm trying to use a custom missile system, and to do that I make every ranged unit's prjectile sped to 10000 (so it's practically instant). The initial damage (DamageEventType = 0) is blocked, and then the custom projectile shoots, and then when it reaches the target it deals triggered damage. The problem is, after a unit takes triggered damage from full health, the next blocked damage heals the damage dealt.

  • Negate Damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to False
      • (DamageEventSource is A ranged attacker) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageEventType Equal to 0
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of DamageEventSource) Not equal to Ancient Vampire
              • (Unit-type of DamageEventSource) Not equal to Shadowy One
              • (Unit-type of DamageEventSource) Not equal to Priest Orb
        • Then - Actions
          • Set DamageEventAmount = 0.00
        • Else - Actions
as far as triggered damage go:

JASS:
set udg_NextDamageType = udg_DamageTypeCode
            call UnitDamageTarget( this.source, this.target, this.damage, true, true, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, null )
            call ConditionalTriggerExecute( udg_ClearDamageEvent )
 
Level 6
Joined
Aug 5, 2015
Messages
202
i have a few triggers using your system
here
1
  • Cenarius guidance
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • DamageEventOverride Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventSource has an item of type |cffff8800Cenarius Flute|r) Equal to True
          • (Unit-type of DamageEventSource) Equal to Arch Druid
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount + (2.00 x (Real((Intelligence of DamageEventSource (Include bonuses))))))
        • Else - Actions
2
  • Evasion ability and GDD
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • DamageEventOverride Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget has buff Evade ) Equal to True
          • (DamageEventTarget is A Hero) Equal to True
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of DamageEventTarget) Equal to Betrayer
              • (Unit-type of DamageEventTarget) Equal to |cff552200Nephalem Betrayer|r (Demon Form Fly)
              • (Unit-type of DamageEventTarget) Equal to Betrayer (Demon Form)
        • Then - Actions
          • Set DamageEventAmount = 0.00
          • Floating Text - Create floating text that reads miss above DamageEventSource with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of DamageEventTarget) Equal to Iron Roots
            • Then - Actions
              • Set DamageEventAmount = 100.00
            • Else - Actions
is my trigger override already right? confused should turn on or off
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,456
i have a few triggers using your system
here
1
  • Cenarius guidance
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • DamageEventOverride Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventSource has an item of type |cffff8800Cenarius Flute|r) Equal to True
          • (Unit-type of DamageEventSource) Equal to Arch Druid
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount + (2.00 x (Real((Intelligence of DamageEventSource (Include bonuses))))))
        • Else - Actions
2
  • Evasion ability and GDD
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • DamageEventOverride Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget has buff Evade ) Equal to True
          • (DamageEventTarget is A Hero) Equal to True
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of DamageEventTarget) Equal to Betrayer
              • (Unit-type of DamageEventTarget) Equal to |cff552200Nephalem Betrayer|r (Demon Form Fly)
              • (Unit-type of DamageEventTarget) Equal to Betrayer (Demon Form)
        • Then - Actions
          • Set DamageEventAmount = 0.00
          • Floating Text - Create floating text that reads miss above DamageEventSource with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
          • Set DamageEventOverride = true
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of DamageEventTarget) Equal to Iron Roots
            • Then - Actions
              • Set DamageEventAmount = 100.00
              • Set DamageEventOverride = true
            • Else - Actions
Fixed
 
Can you show me more? Sounds like something else is interfering with that damage, because it would not be healing based on what you've shown me.

The only other trigger that uses Damage Engine is this:
  • Iconoclast Attack
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventSource) Equal to Priest Orb
    • Actions
      • Set ID = (Custom value of DamageEventSource)
      • Set DamageEventAmount = Iconoclast_dmg[ID]
I could PM you the map if you want.
 
Level 6
Joined
Aug 5, 2015
Messages
202
i still dont get it when i must turn on override function

explain it to me Mr. Bribe

if the damageeventamount = 0 or 1 or etc (anyway if directly set to numbers without complicated multiplied or divide then the override set to true?)
 
Level 6
Joined
Aug 5, 2015
Messages
202
which part the one fixed? which function? :)

i already updated to 3.5.1
btw for unit indexer i use this (almost same to yours but its ok right?)

  • Unit Indexer
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: call ExecuteFunc("InitializeUnitIndexer")
      • Custom script: endfunction
      • -------- --------
      • -------- This is the most important function - it provides an index for units as they enter the map --------
      • -------- --------
      • Custom script: function IndexUnit takes nothing returns boolean
      • Custom script: local integer pdex = udg_UDex
      • -------- --------
      • -------- You can use the boolean UnitIndexerEnabled to protect some of your undesirable units from being indexed --------
      • -------- - Example: --------
      • -------- -- Set UnitIndexerEnabled = False --------
      • -------- -- Unit - Create 1 Dummy for (Triggering player) at TempLoc facing 0.00 degrees --------
      • -------- -- Set UnitIndexerEnabled = True --------
      • -------- --------
      • -------- You can also customize the following block - if conditions are false the (Matching unit) won't be indexed. --------
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • UnitIndexerEnabled Equal to True
        • Then - Actions
          • -------- --------
          • -------- Generate a unique integer index for this unit --------
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UDexRecycle Equal to 0
            • Then - Actions
              • Set UDex = (UDexGen + 1)
              • Set UDexGen = UDex
            • Else - Actions
              • Set UDex = UDexRecycle
              • Set UDexRecycle = UDexNext[UDex]
          • -------- --------
          • -------- Link index to unit, unit to index --------
          • -------- --------
          • Set UDexUnits[UDex] = (Matching unit)
          • Unit - Set the custom value of UDexUnits[UDex] to UDex
          • -------- --------
          • -------- Use a doubly-linked list to store all active indexes --------
          • -------- --------
          • Set UDexPrev[UDexNext[0]] = UDex
          • Set UDexNext[UDex] = UDexNext[0]
          • Set UDexNext[0] = UDex
          • -------- --------
          • -------- Fire index event for UDex --------
          • -------- --------
          • Set UnitIndexEvent = 0.00
          • Set UnitIndexEvent = 1.00
          • Set UnitIndexEvent = 0.00
          • Custom script: set udg_UDex = pdex
        • Else - Actions
      • Custom script: return false
      • Custom script: endfunction
      • -------- --------
      • -------- The next function is called each time a unit enters the map --------
      • -------- --------
      • Custom script: function IndexNewUnit takes nothing returns boolean
      • Custom script: local integer pdex = udg_UDex
      • Custom script: local integer ndex
      • -------- --------
      • -------- Recycle indices of units no longer in-play every (15) units created --------
      • -------- --------
      • Set UDexWasted = (UDexWasted + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • UDexWasted Equal to 15
        • Then - Actions
          • Set UDexWasted = 0
          • Set UDex = UDexNext[0]
          • Custom script: loop
          • Custom script: exitwhen udg_UDex == 0
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of UDexUnits[UDex]) Equal to 0
            • Then - Actions
              • -------- --------
              • -------- Remove index from linked list --------
              • -------- --------
              • Custom script: set ndex = udg_UDexNext[udg_UDex]
              • Custom script: set udg_UDexNext[udg_UDexPrev[udg_UDex]] = ndex
              • Custom script: set udg_UDexPrev[ndex] = udg_UDexPrev[udg_UDex]
              • Set UDexPrev[UDex] = 0
              • -------- --------
              • -------- Fire deindex event for UDex --------
              • -------- --------
              • Set UnitIndexEvent = 2.00
              • Set UnitIndexEvent = 0.00
              • -------- --------
              • -------- Recycle the index for later use --------
              • -------- --------
              • Set UDexUnits[UDex] = No unit
              • Set UDexNext[UDex] = UDexRecycle
              • Set UDexRecycle = UDex
              • Custom script: set udg_UDex = ndex
            • Else - Actions
              • Set UDex = UDexNext[UDex]
          • Custom script: endloop
          • Custom script: set udg_UDex = pdex
        • Else - Actions
      • -------- --------
      • -------- Handle the entering unit (Matching unit) --------
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Matching unit)) Equal to 0
        • Then - Actions
          • Custom script: call IndexUnit()
        • Else - Actions
      • Custom script: return false
      • Custom script: endfunction
      • -------- --------
      • -------- The next function initializes the core of the system --------
      • -------- --------
      • Custom script: function InitializeUnitIndexer takes nothing returns nothing
      • Custom script: local integer i = 0
      • Custom script: local region re = CreateRegion()
      • Custom script: local rect r = GetWorldBounds()
      • Set UnitIndexerEnabled = True
      • Custom script: call RegionAddRect(re, r)
      • Custom script: call TriggerRegisterEnterRegion(CreateTrigger(), re, Filter(function IndexNewUnit))
      • Custom script: call RemoveRect(r)
      • Custom script: set re = null
      • Custom script: set r = null
      • Custom script: loop
      • Custom script: call GroupEnumUnitsOfPlayer(bj_lastCreatedGroup, Player(i), Filter(function IndexUnit))
      • Custom script: set i = i + 1
      • Custom script: exitwhen i == 16
      • Custom script: endloop
      • -------- --------
      • -------- This is the "Unit Indexer Initialized" event, use it instead of "Map Initialization" for best results --------
      • -------- --------
      • Set UnitIndexEvent = 3.00
      • Set UnitIndexEvent = 0.00
 
Last edited:
Status
Not open for further replies.
Top