Boss health reset

Status
Not open for further replies.
Level 4
Joined
Jan 6, 2023
Messages
33
I'm making a trigger that will reset boss' health if army fails to kill him but can't get it to work. Here's my trigger

  • BOSS HEALTH RESET
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TempPoint = (Position of Mannoroth (Level 60) 0272 <gen>)
      • Set TempGroup = (Units within 1000.00 of TempPoint matching (((Attacked unit) belongs to an ally of Player 1 (Red)) Equal to True))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup) Equal to 0
        • Then - Actions
          • Unit - Set life of Mannoroth (Lvel 60) 0272 <gen> to 100.00%
        • Else - Actions
          • Custom script: call DestroyGroup(udg_TempGroup)
          • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 24
Joined
Feb 28, 2007
Messages
3,479
Your TempGroup is picking every unit where Attacked Unit belongs to an ally of Player 1. There is no Attacked unit in this trigger so it won't work.
You probably want to check if the number of enemy units of Mannoroth is equal to zero? Also you need to add a condition to check if the picked unit is alive, since dead units are counted as well.
 
Level 4
Joined
Jan 6, 2023
Messages
33
Your TempGroup is picking every unit where Attacked Unit belongs to an ally of Player 1. There is no Attacked unit in this trigger so it won't work.
You probably want to check if the number of enemy units of Mannoroth is equal to zero? Also you need to add a condition to check if the picked unit is alive, since dead units are counted as well.
Can't exactly find an action that will check if the number of enemy units of Mannoroth is equal to zero. Also would changing Attachked Unit to Matching Unit change it for better?
Whan Linaze said, and your trigger leaks. You create a location and a unit group every second, but only remove them when (Number of units in TempGroup) Equal to 0.
Your custom script should be outside the if/then/else
I've put scripts outside of it right now
 
Level 30
Joined
Aug 29, 2012
Messages
1,382
Try replacing this

  • Unit Group - Pick every unit in (Units within 1000.00 of TempPoint matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
With

  • Unit Group - Pick every unit in (Units within 1000.00 of TempPoint matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit)) Equal to True)) and do (Actions)
Maybe that'll help not killing the boss itself. Alternatively, you could add an Unit condition like (Matching unit) Not equal to (Boss)

About the summon, maybe remove the spell after he used it? Maybe the IA allows him to just reused the spell without you ordering him to do so
 
Level 4
Joined
Jan 6, 2023
Messages
33
Tried removing the spell right after the order but then it just doesn't cast. And the thing is that the boss isn't using the spell just because AI tells to. It uses it because the trigger says "Less than or equal to 1500" so it will cast everytime boss gets hit under 1500Hp... even though I turned off the trigger
 
Level 4
Joined
Jan 6, 2023
Messages
33
Thought about the same thing and I will probably do it. But was wondering if there's a fix to it, in case I would want to make a simple spell dealing damage that he would use multiple times in different fazes of the fight
 
Status
Not open for further replies.
Top