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

[Trigger] Passive skill that takes fixed damage

Status
Not open for further replies.
Level 1
Joined
Jul 27, 2022
Messages
3
I'm making a unit passive skill called "Equality". This passive skill would be quite a bit similar to immortal's "hardened shield" of Starcraft 2 WoL~HotS; when the unit takes damage bigger than 40, it automatically gets fixed into 40. But since I'm not dexterous at triggering at all, I can't make it even from scratch... Can anyone help me?
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
You need a Damage Detection system.

Using Bribe's system the trigger is very simple:
  • Immortal Shield
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Level of Immortal Shield for DamageEventTarget) Greater than 0
      • DamageEventAmount Greater than 40.00
    • Actions
      • Set VariableSet DamageEventAmount = 40.00
This system provides different Events for detecting when damage is taken in the form of Reals.
I know it looks weird but these Real Events act as a way for us mapmakers to create our own custom Events.

Game - DamageEvent becomes Equal to 1.00 basically says "A unit takes damage".

During the damage taken process there are different stages, for example pre-armor calculation and post-armor calculation. This system provides different Events for these different stages. I believe this Event occurs after most if not every other damage mitigating calculation has been made.

DamageEventAmount is the amount of damage that was taken. You can modify this variable in order to adjust the amount dealt.
DamageEventTarget is the unit that received the damage.
DamageEventSource is the unit that dealt the damage. (I didn't need to use it here)

Those are the main variables you'll use but there are many others which provide you the tools necessary to do just about anything damage related.
 

Attachments

  • Immortal Shield.w3m
    59 KB · Views: 10
Last edited:
Status
Not open for further replies.
Top