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

[Solved] damageType isn't working or?

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
here:
  • Necklace of Power Life Steal
    • Events
      • Game - damageEventTrigger becomes Equal to 1.00
    • Conditions
      • damageType Equal to 0
      • (source is A Hero) Equal to True
      • (source has an item of type |cFFFFFF00The Necklace of Power) Equal to True
    • Actions
      • Special Effect - Create a special effect attached to the overhead of source using Abilities\Spells\Undead\VampiricAura\VampiricAuraTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Set life of source to ((Life of source) + (amount x 0.50))
I'm using Physical DDS, and I have condition which checks if the damage tyoe is physical (0), but when the enemy get's damaged with magic type, it also runs....
Why?? this bugs me.....

same thing here:
  • Slauther Slain
    • Events
      • Game - damageEventTrigger becomes Equal to 1.00
    • Conditions
      • damageType Equal to 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • source Equal to Slauther_TrigUnit
          • (target is A Hero) Equal to False
          • (Level of Slauther for Slauther_TrigUnit) Equal to 1
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to 15
            • Then - Actions
              • Floating Text - Create floating text that reads |c00FF0000Slain! above target with Z offset 10.00, using font size 12.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 1.50 seconds
              • Unit - Cause Slauther_TrigUnit to damage target, dealing 1000000000.00 damage of attack type Chaos and damage type Normal
            • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • source Equal to Slauther_TrigUnit
              • (target is A Hero) Equal to False
              • (Level of Slauther for Slauther_TrigUnit) Equal to 2
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 100) Less than or equal to 20
                • Then - Actions
                  • Floating Text - Create floating text that reads |c00FF0000Slain! above target with Z offset 10.00, using font size 12.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                  • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
                  • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
                  • Unit - Cause Slauther_TrigUnit to damage target, dealing 1000000000.00 damage of attack type Chaos and damage type Normal
                • Else - Actions
            • Else - Actions
ffs..
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
Hey no problem, I won't flame you man :D
Just ask as often as you need to.

The thing is, the detection will only work if you implemented the ability correct into your map. This means you copied the DAMAGE_TYPE_DETECTOR ability from the testmap to your map and that you gave it the correct ID.

To check which ID the ability has in your map, go to the object editor, and select "view as raw data" under "view". Then you will see the ID, in the testmap its 'A000' for example.

Once you know the ID, go to the DamageEvent trigger and search this function:

JASS:
function InitGlobalVariables takes nothing returns nothing
    // Put here the correct ability IDs
    set udg_DAMAGE_TYPE_DETECTOR = 'A000'
    set udg_SET_MAX_LIFE = 'A001'
    
    // Here you can configure some stuff, read the documentation for further info
    set udg_SPELL_DAMAGE_REDUCTION_ITEM = 'brac'
    set udg_SPELL_RESISTANCE_AUTO_DETECT = false
    set udg_ETHEREAL_DAMAGE_FACTOR = 1.66
    set udg_BRACERS_SPELL_DAMAGE_REDUCTION = 0.33
    set udg_TRIGGER_CLEANUP_PERIOD = 60.0
endfunction

There you can specify the correct ID for both the damage type detection ability as well as for the damage modification ability.

If you have further questions or problems, just ask.

lfh
 
Level 18
Joined
May 11, 2012
Messages
2,103
JASS:
set udg_DAMAGE_TYPE_DETECTOR = 'A000'

I don't understand....
I have to put here the ID of ability which I want to detect as spell damage...
I have more of those lol

can you explain a bit more? hmmm...
I put here ID of immolation and then it will detect spell dmg of only Immolation, but trigg will run if other spell damage is received lol...
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
JASS:
set udg_DAMAGE_TYPE_DETECTOR = 'A000'

I don't understand....
I have to put here the ID of ability which I want to detect as spell damage...
I have more of those lol

No, there is an ability in the dds map called DAMAGE_TYPE_DETECTOR. It is based on Runed Bracers and gives 2.00 damage reduction. Use that.
 
Status
Not open for further replies.
Top