• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

Dead heroes from groups are sometimes removed from the game

Status
Not open for further replies.
Level 24
Joined
Feb 2, 2006
Messages
1,613
Hi,
I have muliple heroes owned by a computer player who are bosses and will be revived after some time when you kill them.
They are part of a unit group as well.
It seems that sometimes a boss is automatically removed from the game after he dies since he is not revived and I think even the size of the unit group decreases (I show the total number of units in the unit group in the multiboard and it is decreased).
I was wondering how to disable this effect.
Heroes should never completely decay since you must be able to revive them in an altar right?
Or is there some strange unit group bug with dead heroes?
 

Uncle

Warcraft Moderator
Level 58
Joined
Aug 10, 2018
Messages
5,849
So how can I avoid it? Are they really removed from the game or only the unit group? I have far more than 6 heroes for the boss player. Do I need another player for every 6 heroes?!
I don't know any proper solution, but you can always use a Damage system to detect when a unit would die and fake their death. Something like: Negate lethal damage, Hide "dying" unit, create a special effect of dying unit, play effect's death animation, etc... It's not a pretty solution since the unit will still be considered alive which I imagine won't play nice with your other triggers, but I'm sure you could work around these issues without too much effort. I guess it all depends on how far along you are with your project.
 
There is a easy way, but it has heavy sideeffects.
You give your heroes a huge deathtime like 999999s. This delays the moment the death sequenz of such a hero is finished.
By doing that the dead heroes will not lose sight, their corpse will keep laying around, will not be reviveable by altars/tavern, not trigger the becomes reviveable event, there will be no default hero was killed message/sound. One can still revive them by triggers though.
 
Level 24
Joined
Feb 2, 2006
Messages
1,613
Okay, so there is absolutely no way of increasing this limit like via Gameplay constants or triggers?

@Tasyen
Your solution sounds acceptable to me since they are boss heroes but the unit types can also be hired in a tavern for regular players. Hence, I would like to increase their death time for specific units only. Is there any JASS function or unit integer field which allows me to change it per unit or do I need two different unit types?

edit:
I guess it is
Code:
UNIT_RF_DEATH_TIME
?
 
Status
Not open for further replies.
Top