• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Building invulnerable and casts spell

Level 2
Joined
Jan 23, 2025
Messages
12
Hi! I'm almost done with my map thanks to all of you. I need help with the following triggers:

1) When a tower has 60% health it should become invulnerable for 30 seconds.

2) When the tower has 30% health it should cast the starfall spell for 30 seconds as well.

Thank you very much, if possible I would appreciate an example map 🙏🏻
 
Level 30
Joined
Aug 29, 2012
Messages
1,383
This will only work for human controlled players, but you can create abilities based on divine shield/starfall and set their icon positions to this

1740262346814.png


That way they will have the ability but it will be invisible in the command card. Then you can do something like this
  • Shield
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Guard Tower // unit-type comparison
      • (Percentage life of (Triggering unit)) Less than or Equal to 60.00 // real comparison
    • Actions
      • Unit - Order (Triggering unit) to Human Paladin - Activate Divine Shield.
 
Level 24
Joined
Feb 27, 2019
Messages
833
Bribes Damage Engine has events to detect when damage is taken. At that point check for specific target and percentage health of target and execute actions. I created a test map with a particular execution of actions.
  • Tower Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Farm
            • Then - Actions
              • Unit Group - Add (Picked unit) to TowerGroup[1]
              • Unit Group - Add (Picked unit) to TowerGroup[2]
            • Else - Actions
  • Tower Invul
    • Events
      • Game - AfterDamageEvent becomes Less than 0.00
    • Conditions
      • (DamageEventTarget is in TowerGroup[1].) Equal to True
      • (Life of DamageEventTarget) Less than or equal to ((Max life of DamageEventTarget) x 0.60)
    • Actions
      • Unit - Add Divine Shield to DamageEventTarget
      • Unit - Order DamageEventTarget to Human Paladin - Activate Divine Shield.
      • Unit - For DamageEventTarget, Ability Divine Shield, Disable ability: False, Hide UI: True
      • Unit Group - Remove DamageEventTarget from TowerGroup[1].
  • Tower Starfall
    • Events
      • Game - AfterDamageEvent becomes Less than 0.00
    • Conditions
      • (DamageEventTarget is in TowerGroup[2].) Equal to True
      • (Life of DamageEventTarget) Less than or equal to ((Max life of DamageEventTarget) x 0.30)
    • Actions
      • Unit - Add Starfall to DamageEventTarget
      • Unit - Order DamageEventTarget to Night Elf Priestess Of The Moon - Starfall.
      • Unit - For DamageEventTarget, Ability Starfall, Disable ability: False, Hide UI: True
      • Unit Group - Remove DamageEventTarget from TowerGroup[2].
 

Attachments

  • Invul and cast spell Damage Engine 5.A.0.0.w3x
    102.4 KB · Views: 2
Top