• 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.

[Trigger] Sacrifice unit [problem]

Status
Not open for further replies.
Level 2
Joined
Apr 18, 2017
Messages
12
Hello once again, I made a trigger that every 0.10 game time, and if the character drops below 200 hit points, any unit owned by the character within 900 radius one of them will die and the character regains 350 hit points but, on the triggers demands even after all his units die, if his health drops below 200 he still regains health.. So i was wondering is anyone can help me.. (been stuck with this for 3 days)

  • Emuris Sustain
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 900.00 of (Position of (Random unit from (Units of type Emuri)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Life of (Random unit from (Units of type Emuri))) Less than or equal to 200.00
              • ((Picked unit) is in (Units owned by Player 1 (Red))) Equal to True
              • ((Picked unit) is in PickedUnitGroup) Equal to True
              • (PickedUnitGroup is empty) Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (PickedUnitGroup is empty) Equal to False
                • Then - Actions
                  • Unit - Set life of (Random unit from (Units of type Emuri)) to ((Life of (Random unit from (Units of type Emuri))) + 350.00)
                  • Unit - Kill (Random unit from PickedUnitGroup)
                • Else - Actions
                  • Do nothing
            • Else - Actions
heres what the trigger looks like, and some others connected with that trigger.
  • UniteMuri
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 900.00 of (Position of (Random unit from (Units of type Emuri)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is in (Units owned by Player 1 (Red))) Equal to True
              • ((Picked unit) is A Hero) Equal to False
            • Then - Actions
              • Unit Group - Add (Picked unit) to PickedUnitGroup
            • Else - Actions
  • Group Kick
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is in PickedUnitGroup) Equal to True
    • Actions
      • Unit Group - Remove (Dying unit) from PickedUnitGroup
Thanks in Advanced :)
 
Level 2
Joined
Apr 18, 2017
Messages
12
Use a damage detection system. When a unit with the appropriate ability takes damage that puts them below 200 health then search around them for appropriate units. Select a random unit from the appropriate unit group, kill it and then add 350 health to the damaged unit.

No periodic triggers, fully MUI.
I can't seem to understand to what you said..
 
Last edited:
Status
Not open for further replies.
Top