Imagine a map where you are an undercover agent/ghost that has to stage a diversion inside the enemy base. You can dress up as the enemies you've killed, which allows you to pass the guards and achieve your goal. What is the main problem with moving HP from one unit to another? -We can't detect it. Then how about this:
We move the unit to a remote location and deal N damage to it each trigger loop via Direct Damage. When it dies, we know the number of trigger loops it took to kill it, thus the HP. This allows us to give this HP to the new unit.
With that being said, this system also has its cost, drawbacks and some limitations. Here are the most important ones:
1. All enemy attack and maximum HP of your units must be multiples of N to make the system accurate.
2. Detecting HP like this takes time. You can say that changing clothes takes time, which is fairly realistic, but you can't use this to change weapons.
3. While the HP is being detected, the player cannot really be damaged by enemies normally since his unit is moved away from the fighting area. This can be fixed by detecting the HP right in the arena without moving it, but then the Direct Damage can deal damage to nearby units also (its range is about two tiles if memory serves). So it's up to you to decide what method works better for you.
Possible applications: 'The Thing' and other similar arena maps, adventure RPGs such as '5th Station', spells such as 'avatar' from WC3 that change your hero into a stronger unit, but maintain the HP (or the HP ratio, as in the case of the avatar spell). I am considering the possibility of using this in City of the Dead, where the CPU defenders will be healed when they get seriously wounded; this will allow me to control their survivability by controlling the amount of heals they have.
I'm probably not the first one to come up with all this. I just think that we need a thread to discuss this possibility and perhaps think of some solutions/options/methods together.

Post has been edited 2 time(s), last time on Mar 7 2009, 12:36 pm by JaFF.
None.