Currently I'm exploring the possibilities of adding a virtual HP system into my current project and I am haveing troubles with one aspect of the system. I want to be able to detect the unit that attacked the hero so I can have different enemies do varying amounts of damage, for example, if a zergling and an ultralisk are both attacking my hero at the same time and the ultralisk hits first, is it possible to detect that and have the ultralisk do more damage than the zergling in virtual HP?
i know some stuff about virtual hp but i think you should send a pm to lethal_illusion he knows all this stuff -- he can help you ^_^.
You can't really detect the unit that killed the virtual HP unit but you can detect the units around you and maybe randomize the damage. Other than that I would PM Lethal_Illusion since he is doing a lot of trigger work for Crescent Dyne and it involves a lot of virtual HP.
QUOTE(urmom @ Aug 11 2006, 09:03 AM)
You can't really detect the unit that killed the virtual HP unit but you can detect the units around you and maybe randomize the damage. Other than that I would PM Lethal_Illusion since he is doing a lot of trigger work for Crescent Dyne and it involves a lot of virtual HP.
[right][snapback]543361[/snapback][/right]
i already said pm lethal ^_^. hes good mapper o.o
You could have the units owned by different computer players, but that would just be a waste of player slots.
Hmm, do you mean like you could have 3 different players owning the virtual HP units and you would have 3 units under the hero at all times? And then make the computers only allowed to attack 1 specific computer and own one specific type of unit? That could work but like you said it would be a waste of player slots.
QUOTE(Fwop_ @ Aug 11 2006, 09:29 AM)
You could have the units owned by different computer players, but that would just be a waste of player slots.
[right][snapback]543390[/snapback][/right]
im pretty sure thats the answer lethal would of given. good job fwop ^_^
Yeah, I went on SC to find lethal but he wasn't on then so I decided to post on SEN to see if anyone here knows.
lethal was busy earlier he did like 550 ish triggers in 3 hours straight.... and then he had to go ( lethal love me so i know all about him
)
Well read my response then because it's what Fwop said except in more detail and Shocko said that what Fwop said would be what lethal would have said.
my preferred method/solution is somewhat different than how we normally use VHP. it also uses EUD conditions, so it temporarily doesn't work.
basically, its just HP detection. normal VHP recreates the VHP unit(referred to as VHPU from now on) after death and registers that death as a single damage point. my EUDVHP method keeps the same unit so that HP detection will still work. after the VHPU has been hit, it loses hp(obviously). now depending on how much hp was lost, you can just restore some percentage points and minus one from the HP DC.
to restore, you can detect each individual hp loss and subtract one death at a time or detect set increments and subtract much larger portions. the former method is much more work, but its also much more accurate due to the possibility of two units attacking at once
note: make sure the VHPU cannot die under any circumstances, give it a huge amount of health/armor.
alternatively, you can replace the burrowed unit with a vulture spider mine. the hp of the mine would be the maximum damage it could take from one hit. otherwise, everything is the same, instead of one VHPU = 1 HP, it would = 20 Hp(or however much).
some things to keep in mind with the second method, make sure the VHPU hp is a factor of 100 and that your HP will not be updated until the VHPU dies.
note: you use a vulture spider mine so that VHPU's HP won't increase - like it would with a burrowed unit.
the thing people don't seem to realize and need to keep in mind about VHP is that there are dozens of forms of it and the standard 1 ling = 1 HP is not the best.
if you need any clarification, just ask.
QUOTE
the thing people don't seem to realize and need to keep in mind about VHP is that there are dozens of forms of it and the standard 1 ling = 1 HP is not the best.
in my opinion, agreed. the system i usually use for VHP, is you have a location follow your unit. for example, if an enemy brings, lets say, a zergling to this location, you minus, 5 VHP a second. if an enemy brings, lets say, an ultralisk to this location, you minus 10 VHP a second, or however much you like.call me a noob if you like, hehe, i dont care.
That's not really a good method, because what if there's a zergling nearby and it doesn't attack you?
QUOTE(Electroid @ Aug 12 2006, 12:00 AM)
in my opinion, agreed. the system i usually use for VHP, is you have a location follow your unit. for example, if an enemy brings, lets say, a zergling to this location, you minus, 5 VHP a second. if an enemy brings, lets say, an ultralisk to this location, you minus 10 VHP a second, or however much you like.
call me a noob if you like, hehe, i dont care.
[right][snapback]543739[/snapback][/right]
damn noob j/k
to tell you the truth, i kinda expected something more advanced from you, but w/e floats your boat. personally, i find it too simple and not accurate enough for my needs.
it depends how much work you want to contribute to this. the method i suggested is obviously the easiest and most simple way of creating a VHP system. however, if you have human player battling human player, the burrowed unit system won't work very smoothly. thats why i suggested the previous simple and easy method. there is no perfect VHP system however, as you all know, literal HP cannot be detected, or modified by numbers, only by percentage.
I have a second problem. I made a test map for a VHP system but only small melee units can kill the burrowed lings. Ultralisks and Hydras cannot hit the lings.
How can I fix this?
QUOTE(00cnr)
I have a second problem. I made a test map for a VHP system but only small melee units can kill the burrowed lings. Ultralisks and Hydras cannot hit the lings.
How can I fix this?
Click me.I did the search before and did find that post, did what it said and still doesn't work. That's what I have but, how small did you mean 1x1 square or smaller? Currently the location is 1x1 square
its not about location size(its not like the ultra is attacking a location...) it has to do with attack rate and recentering rate. if the target is removed in the middle of an attack, the attack is deem void(hitting nothing). the reason a zergling's(a small melee unit) attack would work, but not the ultra is cause the ultra attacks much slower than the zergling.
Why not do what qpirateking did? Make the burrowed unit have, say, 100 hp, and when it dies, just replace it and make the hero lose 1 hp. the ultralisk could do 40 damage, and the ling could do 10, so the ultralisk would do more damage than the ling.
Hope this is what you wanted, and that no one else has said this (I didn't read through all of the posts).
QUOTE(Fwop_ @ Aug 11 2006, 12:29 PM)
You could have the units owned by different computer players, but that would just be a waste of player slots.
[right][snapback]543390[/snapback][/right]
Plus it only works with special attacks that can be detected, controlled, or produced artifically by triggers. Only recommended if you're making your own attack/health system from scratch (like a gunner or melee fighter system or something), and you can't rely on keeping track of all units you want HP checking for at all times (like if it's possible to have a hundred VHP units on screen at once or something).
For RPG use, or for non-boss units that you must anticipate on finding more than one of in a given setting (that is, you can't just easily assign a unique DC to each), then the burrowed method would work best. You can use the burrowed VHP system for both artifial atk/HP and starcraft's regular unit atk/HP system. I think how to do that has already been explained.
One important tip though: Make sure the burrowed VHP unit is not larger than the unit it's tracking, or else if it moves up against solid terrain it could get "left behind", being unable to be moved with the unit.
In response to your tip Tuxedo Templar, which zerg unit when burrowed takes up the least space?
Zergling. More specifically, the hero zergling. That's the only one you can really use for a VHP unit that won't unburrow when hit.
ADDITION:
Correction: Only hero units and drones can be used for VHP units. Anything else'll unburrow when hit.
QUOTE(Tuxedo Templar @ Aug 21 2006, 06:35 PM)
Correction: Only hero units and drones can be used for VHP units. Anything else'll unburrow when hit.
[right][snapback]548372[/snapback][/right]
Or people may simply not use a computer for vHP (use the human).
Or you may use a "ghost" player. A player that is not there or has been defeated.
Or use P9 (everyone is hostile against him).
Or you could set one player to neutral and have the opposing computers hostile to it. Nothing would unburrow that way.