• 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] Boss reset

Status
Not open for further replies.
Level 4
Joined
Aug 13, 2008
Messages
47
hey, still fixing up the scripted boss fight. I spent a while trying to make the boss reset if everyone died while fighting him which has proved complicated, or maybe more complicated than it should be. I've fixed up the reset if people train out of his room, that part wasnt too much trouble

This is what i have at the moment and im sure theres other ways to do this but right now this isnt working
  • Events
    • Time - Every 10.00 seconds of game time
  • Conditions
  • Actions
    • Unit Group - Pick every unit in (Units in Prides Room <gen>) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Or - Any (Conditions) are true
              • Conditions
            • ((Picked unit) belongs to an enemy of Player 12 (Brown)) Equal to True
          • Then - Actions
          • Else - Actions
            • Unit - Set life of Lieutenant Pride 0042 <gen> to 100.00%
 
Level 4
Joined
Aug 13, 2008
Messages
47
  • Events:
    • Unit - A unit dies
  • Conditions
  • Actions
  • Actions
    • Set tempgroup = (Units in Prides Room <gen>)
    • If ((Number of units in tempgroup) Equal to 0) then do (Unit - Set life of Lieutenant Pride 0042 <gen> to 100.00%) else do (Do nothing)
That's the closet thing i could get to yours. I really appreciate all your help squiggy, really. But id hate to say it but this one isnt working and i cant figure out how to get your exact trigger.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Squiggy, You leaked a group and Do Nothing does what it says (is a blank function call) and so should be avoided at all costs.

You need to trigger a system that handles who is alive and who is dead. If everyone is dead then it sets the boss's HP to full again. You can store how many people are alive in an integer and everytime a person dies you remove 1 from it. Once the integer hits 0 everyone is dead and so you can reset the boss's HP to maximum.
 
Level 4
Joined
Aug 13, 2008
Messages
47
Dr super good, i do appreciate your help but i've only been working with triggers for two days or so and what you're saying sounds like it would work fine i cant convert that into trigger language. Could you maybe give me an example of that trigger or set me on the right path?
And to Squiggy that trigger isnt working =[ ill add the destroy group though. Oh and i noticed something with your trigger squiggy, your trigger works off if any units are in prides room and theres always going to be the boss sitting up in there.. unless theres something im missing
 
Level 4
Joined
Aug 13, 2008
Messages
47
doesnt work =[
  • Unit - A unit Dies
  • Actions
    • Set tempgroup = (Units in Prides Room <gen> matching (((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True))
    • If ((Number of units in tempgroup) Equal to 0) then do (Unit - Set life of (Triggering unit) to 100.00%) else do (Custom script: call DestroyGroup(udg_tempgroup))
 
Status
Not open for further replies.
Top