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

[Solved] Some question about Damage Engine by Bribe

Status
Not open for further replies.

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Hello everyone. I have used this Damage Engine for several weeks but there are two things I'm still not sure how they work:
The first one is about the DamageEventOverride. I'm not sure how this variable work as a condition (what will happen if I set it to true and what will happen if I set it to false???).
The second one is about the custom type of damage. I dont know why the damage engine has this. In the trigger, it set: DamageTypeSpell = 1, DamageTypeDOT = 2 and DamageTypeRanged = 3. Why do it need to set these values and what effect do these value make to the game? I really want to trigger all the spells in my map so I can detect the physical attack damage and the damage from the spells so I need to know how the custom type of damage works.
Thks for reading. :grin:
Here is the link of the system (though it's pretty popular): http://www.hiveworkshop.com/forums/spells-569/gui-damage-engine-v2-2-1-0-a-201016/?prev=d%3Dlist%26r%3D20%26u%3DBribe.
 
Level 10
Joined
Mar 31, 2009
Messages
732
Modify DamageEventAmount/ExplodesUnit/Override from a "DamageModifierEvent Equal to 1.00" trigger. To prevent your script's damage stacking with others, include the condition "DamageEventOverride Equal to false".

Likewise, set "DamageEventOverride" to true if you don't want other scripts to stack with it.
Don't really understand that myself though...
 
[jass=] constant damagetype DAMAGE_TYPE_UNKNOWN = ConvertDamageType(0)

constant damagetype DAMAGE_TYPE_NORMAL = ConvertDamageType(4)

constant damagetype DAMAGE_TYPE_ENHANCED = ConvertDamageType(5)

constant damagetype DAMAGE_TYPE_FIRE = ConvertDamageType(8)

constant damagetype DAMAGE_TYPE_COLD = ConvertDamageType(9)

constant damagetype DAMAGE_TYPE_LIGHTNING = ConvertDamageType(10)

constant damagetype DAMAGE_TYPE_POISON = ConvertDamageType(11)

constant damagetype DAMAGE_TYPE_DISEASE = ConvertDamageType(12)

constant damagetype DAMAGE_TYPE_DIVINE = ConvertDamageType(13)

constant damagetype DAMAGE_TYPE_MAGIC = ConvertDamageType(14)

constant damagetype DAMAGE_TYPE_SONIC = ConvertDamageType(15)

constant damagetype DAMAGE_TYPE_ACID = ConvertDamageType(16)

constant damagetype DAMAGE_TYPE_FORCE = ConvertDamageType(17)

constant damagetype DAMAGE_TYPE_DEATH = ConvertDamageType(18)

constant damagetype DAMAGE_TYPE_MIND = ConvertDamageType(19)

constant damagetype DAMAGE_TYPE_PLANT = ConvertDamageType(20)

constant damagetype DAMAGE_TYPE_DEFENSIVE = ConvertDamageType(21)

constant damagetype DAMAGE_TYPE_DEMOLITION = ConvertDamageType(22)

constant damagetype DAMAGE_TYPE_SLOW_POISON = ConvertDamageType(23)

constant damagetype DAMAGE_TYPE_SPIRIT_LINK = ConvertDamageType(24)

constant damagetype DAMAGE_TYPE_SHADOW_STRIKE = ConvertDamageType(25)

constant damagetype DAMAGE_TYPE_UNIVERSAL = ConvertDamageType(26)[/code]

This has some relation to it.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
^ So how can I use them to detect the damage type? :D

simple just use variables, like DamageEventType = 1 or any and u declare what number what must to do

example:

you must trigger the damage like

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Firebolt (Neutral Hostile)
    • Actions
      • Set DamageEventType = 2
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 10000.00 damage of attack type Hero and damage type Normal
in this example we reduce the damage what target take to 1% if damage type is 2

  • Set Damage
    • 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
          • DamageEventType Equal to 2
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount / 100.00)
        • Else - Actions
you can add armor type if u want via variables, i mean declare same way than the damage eventype and modificate the damage output(DamageEventAmount) related with armor variable
 
Status
Not open for further replies.
Top