• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Negative Health

Status
Not open for further replies.
Level 3
Joined
Dec 19, 2016
Messages
45
Is it possible to make it say it has negative health then, even if it doesn't actually, because I want it to have the illusion of the unit having negative health.
 
Level 13
Joined
Oct 18, 2013
Messages
690
I think if you make the value of a unit's life to high that it overflows, then it is treated as "negative" health. But unless it's a hero that can be revived, I don't think you have any way of working with the unit.
 
Is it possible to make it say it has negative health then, even if it doesn't actually, because I want it to have the illusion of the unit having negative health.
What are you trying to do with this? A unit/hero with negative health becomes nearly invulnerable by normal forms of damage so if you could explain a bit more would be helpful and I will upload an example map sometime today or tomorrow.

I think if you make the value of a unit's life to high that it overflows, then it is treated as "negative" health. But unless it's a hero that can be revived, I don't think you have any way of working with the unit.
Around 2.1 billion some part of the integer system fails and tries to kill the unit/hero however the health value is actually a real so this can be bypassed as reals can go way higher then integers. The actual limit before the game decides to set the objects health to 0 is around 27 or 28 zero's. You don't even need to kill the hero or unit as we have had the ability to stop unit/hero death for a while, I think its been possible since phoenix got added into the game however there is a few other methods to achieve this visually(meant as unit not dying) or some type of revive/respawn however actually not requiring any form of revive/respawn is limited to only one ability last I checked.
 
Last edited:
Level 3
Joined
Dec 19, 2016
Messages
45
Sorry for the vague wording on my request. I had poor internet at the time and couldn't type very much very fast. So what I plan to do is a boss fight. In the fight, when the boss is killed (which will be very easy), they will come back to life. The boss will then become very powerful, and will have 0 health at the start of the second stage. When they take damage, they will have negative health, and will be able to take damage but can't be killed. The way to defeat the boss is to outlast them. Eventually what is keeping them alive will fail and they will die. The negative health is to make them seem undefeatable. The only problem is the unit will be a hero. If necessary, I will make them a non-hero if a hero status will break it. Thank you for the help! :D
 
I meant to post an example sooner, my bad however here's two examples of negative health. The other methods are usually a dummy minus health ability combined with the stop death ability from phoenix or coded revive.

This does mess up some code for getting object health however there is an easy fix if you know how to use coded abilities or/and a damage detection system and unit indexers as max health still displays properly.
 

Attachments

  • latestTestmap.w3x
    18.7 KB · Views: 49
Status
Not open for further replies.
Top