• 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] [Solved] Checking if all Heroes are Revived

Status
Not open for further replies.
Level 7
Joined
Sep 4, 2016
Messages
116

Hello my fellows!​

I am running into an interesting challenge with one of my triggers for my current map project, having to do with the revival process for Heroes the player uses. A player can have up to two heroes, and when all heroes are alive, I need to remove units used only during the revival process.

It's been working pretty well, until one hero produced a problem.

I have a hero using a hero ability with Stone Form as the base ability, so there are unit equivalents involved. I have found that when this hero dies in its alternate form, if it is not revived first, my trigger detects no remaining dead heroes, and subsequently prevents his revival.
I have another hero with a normal Stone Form ability, where this issue does not occur.

I'm not really sure how best to fix this or what might be the exact reason the alternate form , so I have my trigger here (most of it). Any ideas how to fix this? All guidance will be appreciated!

I'm not used to posting triggers, so it may not look great. I also understand, looking back, this would have some leaks with the unit groups I think (I will probably fix that soon).
  • Events
    • Unit - A unit Finishes reviving
  • Conditions
    • ((Units owned by (Triggering player) matching ((Unit-type of (Matching unit)) Equal to Special Revival Unit)) is empty) Equal to True
  • Actions
    • Unit Group - Add all units of (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) to HeroesAliveCalculation
    • Set IntC = (Number of units in HeroesAliveCalculation)
    • Unit Group - Pick every unit in HeroesAliveCalculation and do (Actions)
    • [Loop - Action]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • [If - Conditions]
          • ((Picked unit) is alive) Equal to False
        • [Then - Actions]
          • Unit Group - Remove (Picked unit) from HeroesAliveCalculation
    • [If (All COnditions are True) then do (Then Actions) else do (Else Actions)
      • [If - Conditions]
        • (Number of units in HeroesAliveCalculation) Equal to IntC
      • [Then - Actions]
        • ... Remove some specified unnecessary unit group
 
Last edited:
Level 7
Joined
Sep 4, 2016
Messages
116
care to share your map?

also - How To Post Your Trigger

(although it seems you weren't far off... just might have overcomplicated it a little)
I've actually been preparing to post it, and was hoping to get it past Beta to post it, although, on the other hand, I have been thinking about posting it as a Beta as it has been taking longer than expected.

Also, thank you for the link to that tutorial, I have updated the trigger!
 
Level 25
Joined
Mar 29, 2020
Messages
1,466
I've actually been preparing to post it, and was hoping to get it past Beta to post it, although, on the other hand, I have been thinking about posting it as a Beta as it has been taking longer than expected.
I didn't mean to post it as a full project in the maps section, just to post it here so me and other people trying to help you will have an easier time identifying the problem and how to fix it.
 
Level 7
Joined
Sep 4, 2016
Messages
116
I guess I might as well.
Note that I am not using the latest version (I am using the 1.27a version of Warcraft)

The hero with the problem is the Oversized Sea Turtle, as placed in the bottom left corner near player one's start location. (Placed for testing). The Mushroom beside him is the hero that has the Stone Form ability as a normal ability.
(Both of these heroes are in the category: Neutral Passive custom heroes).

Also: I started thinking of other hero abilities that involve choosing when to change to an alternate form and back, and I'll probably try testing it later today switched to the Tinker's level 6 as the base.
 

Attachments

  • Deathrose -- Warpact.BETA.1.8b.w3x
    787.7 KB · Views: 20
Last edited:
Level 25
Joined
Mar 29, 2020
Messages
1,466
I wasn't able to replicate your problem, but I did find a different related bug - when both heroes are dead - you can revive both even if you only sent one shade to the monolith, and the other shade stays around even when the hero is revived. by repeating this you can accumulate free invincible shades...
 
Level 7
Joined
Sep 4, 2016
Messages
116
I did not think of that.. Thank you for pointing that out, I have an idea for how to fix that.
I did resolve the original problem though, by switching the base ability to Robogoblin.

Even though it was more of a process of thinking out loud, again, Thank You for your help! And thank you for pointing out what else you noticed!
 
Status
Not open for further replies.
Top