How to make Blade Mail (trigger)

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,211
If you request triggers i added it bellow but it easier to edit it in object editor
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Level of Thorns Aura for (Attacked unit)) Equal to 1
          • (Level of Thorns Aura for (Attacked unit)) Equal to 2
          • (Level of Thorns Aura for (Attacked unit)) Equal to 3
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Thorns Aura for (Attacked unit)) Equal to 3
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) - 30.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Thorns Aura for (Attacked unit)) Equal to 2
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) - 20.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Thorns Aura for (Attacked unit)) Equal to 1
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) - 10.00)
        • Else - Actions
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Thorns Aura and Blademail has 2 different mechanics, beware

So in this case, your trigger (Darkgrom's) is not what Blademail does.

Blademail will return both magical and physical damage to the damage source (Caster). This occur when the Caster is hit, not when about to be hitten

Therefore, you'll need Damage Detection System, luckily we have one right here: http://www.hiveworkshop.com/forums/...v=search=Gui%20damage%20detection&d=list&r=20
 
Level 4
Joined
Aug 12, 2010
Messages
26
If you request triggers i added it bellow but it easier to edit it in object editor
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Level of Thorns Aura for (Attacked unit)) Equal to 1
          • (Level of Thorns Aura for (Attacked unit)) Equal to 2
          • (Level of Thorns Aura for (Attacked unit)) Equal to 3
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Thorns Aura for (Attacked unit)) Equal to 3
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) - 30.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Thorns Aura for (Attacked unit)) Equal to 2
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) - 20.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Thorns Aura for (Attacked unit)) Equal to 1
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) - 10.00)
        • Else - Actions

It's not my skill
 
Level 4
Joined
Aug 12, 2010
Messages
26
  • Damage Detection
    • Events
    • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
    • Trigger - Add to Blade Mail <gen> the event (Unit - (Entering unit) Takes damage)
  • Blade Mail
  • Events
  • Conditions
  • Actions
  • Trigger - Turn off (This trigger)
  • Unit - Cause (Triggering unit) to damage (Damage source), dealing (Damage taken) damage of attack type Spells and damage type Normal
  • Trigger - Turn on (This trigger)

why it doesnt work with spell damage? can you fix it?

  • BM Init
  • Events
  • Time - Elapsed game time is 0.00 seconds
  • Conditions
  • Actions
  • Hashtable - Create a hashtable
  • Set BM_Hashtable = (Last created hashtable)
  • For each (Integer BM_Loop) from 1 to 13, do (Actions)
  • Loop - Actions
  • Player - Disable Spell Book for (Player(BM_Loop))
  • Set Temp_Group = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
  • Unit Group - Pick every unit in Temp_Group and do (Actions)
  • Loop - Actions
  • Hashtable - Save 1 as 5 of (Key (Picked unit)) in BM_Hashtable
  • Trigger - Add to BM Damage <gen> the event (Unit - (Picked unit) Takes damage)
  • Trigger - Add to BM Cast <gen> the event (Unit - (Picked unit) Starts the effect of an ability)
  • Custom script: call DestroyGroup(udg_Temp_Group)
  • Trigger - Turn off (This trigger)
  • BM Enter
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (((Triggering unit) is A Hero) Equal to True) and ((Load 5 of (Key (Triggering unit)) from BM_Hashtable) Equal to 0)
    • Actions
      • Set BM_Enter = (Transporting unit)
      • Set BM_Integer = (Load 5 of (Key (Triggering unit)) from BM_Hashtable)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BM_Integer Equal to 0
        • Then - Actions
          • Hashtable - Save 1 as 5 of (Key (Triggering unit)) in BM_Hashtable
          • Trigger - Add to BM Damage <gen> the event (Unit - BM_Enter Takes damage)
          • Trigger - Add to BM Cast <gen> the event (Unit - BM_Enter Starts the effect of an ability)
          • Set BM_Enter = No unit
        • Else - Actions
  • BM Cast
    • Events
    • Conditions
      • (Ability being cast) Equal to Blademail Activation
    • Actions
      • Set BM_Caster = (Triggering unit)
      • Set BM_Duration = 50
      • Unit - Add Spell Book to BM_Caster
      • Unit Group - Add BM_Caster to BM_Group
      • Hashtable - Save BM_Duration as (Key BM) of (Key (Triggering unit)) in BM_Hashtable
      • Trigger - Turn on Loop <gen>
  • Loop
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BM_Group and do (Actions)
        • Loop - Actions
          • Set BM_Duration = (Load (Key BM) of (Key (Picked unit)) from BM_Hashtable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BM_Duration Greater than 0
            • Then - Actions
              • Hashtable - Save (BM_Duration - 1) as (Key BM) of (Key (Picked unit)) in BM_Hashtable
            • Else - Actions
              • Unit - Remove Spell Book from (Picked unit)
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in BM_Hashtable
              • Unit Group - Remove (Picked unit) from BM_Group
              • Unit - Remove Blademail buff from (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in BM_Group) Less than or equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions

  • BM Damage
    • Events
    • Conditions
      • ((Triggering unit) has buff Blademail ) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Cause (Triggering unit) to damage (Damage source), dealing (Damage taken) damage of attack type Spells and damage type Normal
      • Trigger - Turn on (This trigger)
I think it's because the bug is not used, then it does not stick.
 
Last edited by a moderator:
Status
Not open for further replies.
Top