I'm thinking about different thing in my map that I want to make. It will require Virtual HP. But how to display it so it shows the current HP relativley to the maximum. Minerals/gas won't do, because one of them will be occupied by DMG upgrades, and the other one will be used as "mana".
I was thinking about a HP line that is filled if you have full HP (done before), but I will have to copy+paste a lot of triggers to display the HP for each level (because you will gain HP with levels). And the second thing I don't like is it not showing the actual number - the player will never understand how much Max HP he has in numbers.
Changing your invincible heroe's HP - same problem - many triggers and can't see the number.
Display numbers on minimap - way too much work.
So, can anybody think of some calculations with deathcounters/something else to avoid making a trigger for each possibility. Maybe someone made a map with VHP and can share his/her experience ?
The classic Bar on the minimap that gets filled with units.
Its actually not that many triggers.
Basically have one location and have a mobile grid move up and down along it. According to some ammount of deathcounts. (set the deathcounts on some number that can go either way, like 100 or something, if they have more then 100 it means they gained life, les then 100 remove life.) To gain life simply move the mobile grid along the pathway one unit at a time, leaving a trail of units. To remove life simply take away one unit at the end location, and move it over the other way one space. To add a limit to the players, have the bar extend until it reaches a different burrowed unit. If the end location is upon this unit, and the life is still trying to go up, simply stop it.
then again there are other ways to do it, using give units and such, but they may take more or less triggers depending on the direction the bar is facing.
QUOTE(Rantent @ Jul 31 2006, 01:25 PM)
The classic Bar on the minimap that gets filled with units.
Its actually not that many triggers.
Basically have one location and have a mobile grid move up and down along it. According to some ammount of deathcounts. (set the deathcounts on some number that can go either way, like 100 or something, if they have more then 100 it means they gained life, les then 100 remove life.) To gain life simply move the mobile grid along the pathway one unit at a time, leaving a trail of units. To remove life simply take away one unit at the end location, and move it over the other way one space. To add a limit to the players, have the bar extend until it reaches a different burrowed unit. If the end location is upon this unit, and the life is still trying to go up, simply stop it.
then again there are other ways to do it, using give units and such, but they may take more or less triggers depending on the direction the bar is facing.
[right][snapback]535323[/snapback][/right]
To extend it is a good idea. But then again, you don't know what is your HP in digits... For some reason, it seems a bit wierd if you just see al ine, and can't see it in numbers.
Well you can tell when it goes up and down, so if you give it a starting place you can always have it be displayed someplace with a number as well.
So have numbers written on the terrain near the HP line, so you see atleast approx. how much you have ?
If you want to do it in numbers on the minimap, that is entirely possible, but it would need alot of triggers. Perhaps find a way to draw numbers with a square building like a pylon or turret. And then.. make locations in a grid. The way a clock works, some of the lines dont change at all, so you can just keep them there. Use something to flag the V-HP like death counters. And then you can say:
Conditions:
Death counter for player [Player whos hp is being changed] is exactly [HP#]
Actions:
If your using hypers, insert a 1 second deathcounter wait here.
Kill all [Units that create number on minimap]
Create Units which display HP on minimap
Preserve Trigger
Of course... you would have to make a trigger for each HP number... so it wouldnt be easy. If you wanted, you could make it easier and flag each DIGIT. so you could use 1 death counter for each digit, and when the 1's place gets to 0, set the 2's place down 1. That would probably lower the amount of triggers needed immensely.
...Maybe just display the maximum HP as a number, and the current HP in % ? Or in that line ? Or as your heroe's HP ?
You can make an HP gauge.
EG.
|XXXXXXXXXX| Full X=Counter
| XXXXXXXXX| When 1 VHP Counter is destryed.
| | When all counters gone, kill the unit.
I'll give an example where to use this.
Suppose you make an RPG. You can use minerals as money. Vespene gas can be your VHP Life counter thingymabob. You can make a location follow your primary unit. Everytime an enemy unit moves into the location, you can make your vespene gas drop (vespene gas as VHP Life counter) Once your vespene gas reaches 0, you can make a trigger that removes 1 counter on the bar and make another trigger that resets your vespene gas to the desired number. Adding to this, you can make upgrades that improves your vespene gas amount, and the number of counters you have on the bar.
If you don't understand, I'm sorry. I'm bad at explaining things.
why don't you have the hp displayed on another vincible unit/building. you could get a general idea of your hp from your unit and for more exact data, just press a hotkey to see your vincible unit with exact data.
I had the same problem a while back... I fixed it by make upgrade/mana like when you went to upgrade the triggers would have death counters for ur upgrade and convert it 2 gas.... and when u left it would rember your health with death counters and convert it back 2 gas!! it was pretty cool!
A Zerg unit that can't attack (Like a Lurker that is on unburrowable terrain.) with 1000/100 HP is by far the most logical choice. It allows for natural regenerative ability without any triggering, setting to any HP level with triggering or timed medic creation at the area. You could also just create the units attacking there until they're killed for damage dealing. It's lazy and it works.
QUOTE(Syphon)
A Zerg unit that can't attack (Like a Lurker that is on unburrowable terrain.)
Unburrowable terrain dosen't exist.
QUOTE(Syphon)
with 1000/100 HP
LOL
QUOTE(Syphon)
It allows for natural regenerative ability without any triggering, setting to any HP level with triggering or timed medic creation at the area. You could also just create the units attacking there until they're killed for damage dealing. It's lazy and it works.
That has nothing to do with displaying virtual HP.
*Syphon fails to make me laugh*
um make it display by custom score? and show leaderboard score custom just a thought and it would work so ya