• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Dead heroes from groups are sometimes removed from the game

Status
Not open for further replies.
Level 25
Joined
Feb 2, 2006
Messages
1,695
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 64
Joined
Aug 10, 2018
Messages
6,583
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 25
Joined
Feb 2, 2006
Messages
1,695
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