Staredit Network

Staredit Network -> Concepts -> Different Virtual HP Idea
Report, edit, etc...Posted by ragnarokk on 2006-12-14 at 00:13:57
I hope this hasn't been suggested/tried/used. I certainly haven't seen a map use it or anyone suggest it.

The Idea is this:
The units that attack you are duplicated elsewhere in the map and do damage to other units which allows you to use a counter to represent your HP.

I thought of this as I went about my day and decided to try it. Here is how I did it.

When a enemy enters the location around your unit, it becomes a different player's unit (still enemy). This way we can account for each unit that is attacking you without accidentally counting it +2x. The dissadvantage of this is that you have to have a trigger for every type of enemy that you will ever face (only one trigger albeit). When the unit is giving to the other player it is duplicated to a remote location where it kills a unit over and over. (I made this unit have 100 HP for easy calculation, this way we can have different armor levels (like regular Virtual HP)) When the unit dies it adds to a counter where your life is represented. (I went to 10, again for easy calculation, easily changed) when it reaches the max (or runs out, depending on how you decide to count) the unit dies. (Of course)

Advantages:
No cycled units
Others, few

Disadvantages:
Requires another at least 2 computer enemies.
Inaccurate, the actual amount of times your unit is hit is irrelevant. Often the duplicate will be off
Even if a unit is not attacking you, if it is in close proximity of you, you will take damage
Ranged enemies are tricky and require more intricate triggers
In general the triggers are more complex


Do the advantages outweigh the disadvantages? No. Unless this technique can be perfected, this is essentially no point. Unless, of course, you need control over your units health but cannot use cycling units (can't think of a situation where this would apply)

With enough perfection, I believe it can be useful.

Any thoughts? Suggestions?

Here is the test map I created where the technique is used (sloppily, I hastily put this together)
Report, edit, etc...Posted by Tuxedo Templar on 2006-12-14 at 00:41:22
I think something like this was done awhile back, but probably not this exact method. The closest I've had done to something like this is with Trigger Happy D where damage to the end target building was "predicted" by how many units are nearby. It was a bit sloppy, but it worked passingly for my purposes.

This isn't a bad method, albeit a bit imprecise and a tad costly (2 players). Still, accounting for units specifically is probably a lot cleaner, and might work if you only need to loosely keep track of damage. Plus of course you have to be sure players can't micro on one end to avoid hits but still be taking damage virtually.
Report, edit, etc...Posted by spinesheath on 2006-12-14 at 02:12:30
What is the duplicate unit useful for then... When you already detect if there is an enemy nearby, and do damage according to only this fact (there is no way to tell if you are really attacked...), you could use a DC as HP, and just subtract deaths according to the time the enemy is nearby...
Report, edit, etc...Posted by Tuxedo Templar on 2006-12-14 at 03:25:48
So you can control for how damage is received? Like if you added custom buffs for heroes and you wanted them to affect damage based on who is attacking.

Of course, that's far from the best overall way to do it, but it might have niche use if those other methods wouldn't work for whatever reason.
Report, edit, etc...Posted by ragnarokk on 2006-12-14 at 08:04:16
QUOTE(spinesheath @ Dec 14 2006, 12:12 AM)
What is the duplicate unit useful for then... When you already detect if there is an enemy nearby, and do damage according to only this fact (there is no way to tell if you are really attacked...), you could use a DC as HP, and just subtract deaths according to the time the enemy is nearby...
[right][snapback]603528[/snapback][/right]


As far as I'm aware, you cannot detect if a unit has upgrades.

With this method the upgrades are added directly in. Say your enemy is a zergling and he gets the upgrade to attack faster and a couple melee upgrades. That is taken right in to account. Even if you could detect upgrades, it would be a pain to change the time for every upgrade for every unit.

"This isn't a bad method, albeit a bit imprecise and a tad costly (2 players). "

Also, you don't technically need 2 players, it just works best this way. The units that enter and are duplicated need to be "changed" in a way to avoid multiple duplications. I used change player because it is most accurate, in my opinion.

You could, say, place an Observer over each unit that is duplicated and make it so that it doesn't duplicate men with an Oberver in close proximity. This would be sloppy and especially bad for moving units. There are other methods of course.

When the units are duplicated, you just have more control over the damage. Biggest problem by far is inaccuracy, though improveable.

Do zerglings "position" zones change at all when attacking? (Don't know how to say that). I mean, is it possible a Zergling could only enter the centering location if it attacked the object that blocked it, making it's attacking animation enter.

It just seems as though they move forward and back when they attack.
Report, edit, etc...Posted by Kookster on 2006-12-14 at 19:14:02
Its a new idea but it would be very hard to impliment, and there are alot of variables!
Report, edit, etc...Posted by SomeIdiotNerd on 2006-12-14 at 19:51:00
i guess it could work, but one disadvantage that i notice while looking at your post is that it will look like the enemy unit is not attacking you, do to the fact that your unit/hero is invincible
Report, edit, etc...Posted by Rantent on 2006-12-14 at 21:05:26
I see no cycled units as a disadvantage, because cycling can produce more effects than simply hp.

Also it would simply be easier to figure out how fast the unit attacks and simply make it all death counts, because either way does not necessarily work for multiple units in close proximity. (Who are allied.) The bug lies in that it simply finds what enemies are closest.

I tried a similar technique where as long as units were within certain ranges of your hero, you periodically recieved damage and experience. (Using the method Idescribed above.) Unfortunately I couldn't account for whether or not the enemies were atacking you or someone near you. (I suppose I could have altered it if an ally was in proximity of the enemy as well and simply split the damage, but that would look weird, being dealt damage while not being attacked.)
Report, edit, etc...Posted by ragnarokk on 2006-12-15 at 17:24:51
QUOTE(Rantent @ Dec 14 2006, 07:05 PM)
I see no cycled units as a disadvantage, because cycling can produce more effects than simply hp.

Also it would simply be easier to figure out how fast the unit attacks and simply make it all death counts, because either way does not necessarily work for multiple units in close proximity. (Who are allied.) The bug lies in that it simply finds what enemies are closest.

I tried a similar technique where as long as units were within certain ranges of your hero, you periodically recieved damage and experience. (Using the method Idescribed above.) Unfortunately I couldn't account for whether or not the enemies were atacking you or someone near you. (I suppose I could have altered it if an ally was in proximity of the enemy as well and simply split the damage, but that would look weird, being dealt damage while not being attacked.)
[right][snapback]603856[/snapback][/right]


Cycled units is still possible, but not needed.

As for your comment about taking damage off according to attack speed, see my earlier comment responding to someone who said the same thing.

"As far as I'm aware, you cannot detect if a unit has upgrades.

With this method the upgrades are added directly in. Say your enemy is a zergling and he gets the upgrade to attack faster and a couple melee upgrades. That is taken right in to account. Even if you could detect upgrades, it would be a pain to change the time for every upgrade for every unit."

About you comment about close proximity allies: I had mentioned that was one of the problems. The requiring location could be very small and eliminate that problem (mostly), this could make the duplicate damage less accurate, however.

QUOTE(SomeIdiotNerd @ Dec 14 2006, 05:51 PM)
i guess it could work, but one disadvantage that i notice while looking at your post is that it will look like the enemy unit is not attacking you, do to the fact that your unit/hero is invincible
[right][snapback]603809[/snapback][/right]


In the Example map I made, you are not invincible. You just have very high armor which makes it appear as if they don't do damage because the representing life sets your HP constantly.
Report, edit, etc...Posted by Rantent on 2006-12-15 at 17:52:45
Well actually there are two different way to make them upgrade.
You could do everything by death counts. So when you reach a certain point in the game, the damage they inflict over time grows larger. (This would be as easy as simple switches.)

But your running an AI scrpit I imagine, and having them actually upgrade, in which case there are ways of sorts to go about detection.

Upgrades cost money.

Just make it so upgrading attack is the only thing they can spend one form of money on. So just have the cost of building enemies take minerals, and upgrading to cost gas; or you could set units defence as costing minerals, while attack costs gas or something to detect each upgrade and make unit costs to build free. (In which case use the ammounts of supply they have to estimate how many enemies they have.)

Then whenever they spend money. You know they've upgraded.

Of course your way is easier, but I never like using two computers for one system.
Next Page (1)