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

Boss reset and hero revival after dying from boss

Status
Not open for further replies.
Level 3
Joined
May 7, 2020
Messages
12
Hello everyone! I am making a map with a bunch of boss fights. At the beginning players (1-8) choose a hero from a tavern. Then a Ressurection Stone activates (just in case they die before boss fight or even during it). So, at the beggining of a boss fight the room closes gates (so that players can't just run away from boss room). And I need to make a system that will work the following way: Let's say there are 4 players playing right now, and during boss fight one after another they die. They will be ressurected by the Res.Stone but, I want heroes not being able to get ressurected before all other players die. And only after last player will die to boss, they will all get revived. but boss will need to get reseted (hp/mana).
All the triggers for boss fight mechanichs are already made. (I could attach some trigger screenshots, but they are in another language, not english, so I don't think they will be helpful). Would appreciate the help, thanks in advance!

Addition: I was thinking of adding those sold from tavern heroes to the unit group, but got confused with that system.
 
Level 29
Joined
Sep 26, 2009
Messages
2,597
From what you wrote, I would say you have some kind of boss room where the fight takes place. So what you can do is place a region over the entire boss room. This region will be used to check if there are any player heroes alive when any of them dies.

In trigger editor, I would create a boolean variable called something like 'BossFightInProgress' and use the following logic:
  • In your trigger that closes the gate to boss's room: set 'BossFightInProgress' variable to 'True'
  • When a player hero dies during the boss fight:
    • Pick all player heroes in the region in the boss's room - if none are alive, then you can reset the fight (boss's health, open gate, etc.), set the BossFightInProgress to 'False' and run the resurrection trigger to resurrect all player heroes.
  • In the Resurrection trigger:
    • Check if the 'BossFightInProgress' variable is False to allow the trigger's actions to run
This way, if a player hero dies during a boss fight, the resurrect trigger should not revive the hero, but if the player hero dies during any other time, it should revive him immediately
 
Level 3
Joined
May 7, 2020
Messages
12
From what you wrote, I would say you have some kind of boss room where the fight takes place. So what you can do is place a region over the entire boss room. This region will be used to check if there are any player heroes alive when any of them dies.

In trigger editor, I would create a boolean variable called something like 'BossFightInProgress' and use the following logic:
  • In your trigger that closes the gate to boss's room: set 'BossFightInProgress' variable to 'True'
  • When a player hero dies during the boss fight:
    • Pick all player heroes in the region in the boss's room - if none are alive, then you can reset the fight (boss's health, open gate, etc.), set the BossFightInProgress to 'False' and run the resurrection trigger to resurrect all player heroes.
  • In the Resurrection trigger:
    • Check if the 'BossFightInProgress' variable is False to allow the trigger's actions to run
This way, if a player hero dies during a boss fight, the resurrect trigger should not revive the hero, but if the player hero dies during any other time, it should revive him immediately
Thank you so much for answering! May I ask as well, if that will not be hard for you, how to make like “check that hero belongs to a player and that it is exactly the bought hero, not the one that I for instance placed by myself in WE before checking the map” and add them into a variable that could be named «HeroesGroup». Since all of these heroes will belong to 4 different players, I am not sure I can add them to the one variable…🙏
Cuz my “reset boss” stuff works only if a hero died that belongs to a “HeroesGroup”. Not from just a random hero that I would placed manually.
 
Level 29
Joined
Sep 26, 2009
Messages
2,597
You would need to create a variable with type 'Unit Group' into which you would add your heroes when they are picked by a player.
If you are just selling heroes similarly to how a Tavern works in melee maps, then you can detect when hero has been sold like this:
  • Hero Sold
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
    • Actions
      • Unit Group - Add (Sold unit) to HeroesGroup
 
Status
Not open for further replies.
Top