• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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 :)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
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.
 
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