• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

[Trigger] No Units Health probleme

Status
Not open for further replies.
Level 7
Joined
Mar 8, 2009
Messages
360
  • bla
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Picked unit)) Equal to Skeleton Warrior) and ((Life of (Picked unit)) Less than 500.00))) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Night Elf Druid Of The Claw - Roar
the problem with this is that it will keep ordering the unit to roar, so you will have to give it just enough mana for on roar :s
 
And a better version:
  • Trigger1
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set T_G = (Units in (Playable Map Area))
    • Unit Group - Pick up every unit in (T_G) and do (Actions)
      • Loop - Actions
        • Set Unit1 = (Picked unit)
        • Unit - Add (Unit1) to (CheckGroup)
        • Trigger - Add to Trigger3 <gen> the event (Unit - Unit1 takes damage) (Specific unit event)
    • Custom script: call DestroyGroup (udg_T_G)
  • Trigger2
  • Events
    • Unit - A unit enters (Playable Map Area)
  • Conditions
    • ((Triggering unit) is in (CheckGroup)) Equal to True
  • Actions
    • Unit - Remove (Triggering unit) from (CheckGroup)
    • Trigger - Add to Trigger3 <gen> the event (Unit - (Triggering unit) takes damage)
  • Trigger3
  • Events
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Skeleton
    • (Life of (Triggering unit)) Less than Or Equal to 500.00
  • Actions
    • Unit - Order (Triggering unit) to Night Elf Druid of the Claw - Roar
 
Status
Not open for further replies.
Top