PDA

View Full Version : Questions about auto-healing, finding hurt units and more


Evilferret
02-22-2008, 8:14 PM
Questions...

(1) I want a trigger that heals a unit's health by a certain percentage every second (Say, 2% healing per second) Is this possible?

(2) I want a condition & trigger that will locate an injured unit on the map, then move a location to that unit. Possible?

(3) I want a condition & trigger that will move a location to a unit when it dies (Of course, since it is dead the unit will no longer be present). This doesn't seem possible, is there an alternative other than making the location center on the unit as long as it's alive?

(4) I want a trigger that will cause a unit to flee away from an enemy when approached. I know the condition part, but don't know the action. Any idea?

Thanks :)

Polkaman
02-22-2008, 8:48 PM
4. try for the action, order all men for (player) to (location)

SilverCrusader
02-22-2008, 8:50 PM
(1) I want a trigger that heals a unit's health by a certain percentage every second (Say, 2% healing per second) Is this possible?
I wish.

(2) I want a condition & trigger that will locate an injured unit on the map, then move a location to that unit. Possible?
Sadly this isn't possible either.

(3) I want a condition & trigger that will move a location to a unit when it dies (Of course, since it is dead the unit will no longer be present). This doesn't seem possible, is there an alternative other than making the location center on the unit as long as it's alive?
Well, the location will stop following it once it dies.. Because it is dead. But no you can't detect a unit that is about to die.

(4) I want a trigger that will cause a unit to flee away from an enemy when approached. I know the condition part, but don't know the action. Any idea?
Order Command or Execute AI script: Junk Yard Dog. Your choice. Junk yard dog would make the unit go crazy though.

For questions 1 - 3: This is all impossible unless Virtual HP is used. However that system uses other units as weapons and units are generally invincible (So regular attack doesn't apply). The data about how much life a unit has left is stored by deaths, units on the map, or score.

Durandal
02-22-2008, 8:56 PM
You cannot heal a unit through triggers (spawning medics aside), you can only set their HP. But if a unit's HP is at 100 and you have a trigger "set" it 2% up and continuously from 0, then he'll have 2 HP for a moment and become vulnerable.

Not conventionally possible. Starcraft cannot detect hitpoints outside of EUD triggers, which are for the most part rendered obsolete due to a battery of patches. However, EUD conditions have not been patched. You could still theoretically look up the memory locations for the unit hitpoints, but this would be a bit difficult, and would only work on PC's. You'd probably need to update it for every patch, too.

There's a method to that, I attached a map I found lying around that does it. Good luck deciphering it.

You would have to manually order it to move away. There are two methods, which is to either detect where the unit is relative to the player and then spawn 9 overlords around the player. Then if say, you want to move up, you give five overlords to another player, and give the last overlord to a different player, have a trigger detect that last overlord, center a location on it, remove the overlords, and order the unit towards it, moving it upwards. And then there's this incredibly complex vulture micro map that's would probably only work on one unit at a time, but since you're probably referring to a boss, I attached that map as well.


Hope I actually helped, ask if you have any questions, I know I wasn't particularly thorough.

Polkaman
02-22-2008, 9:31 PM
I thought of #3, and this could be expiemently...

Center the location on a guy.
Do a condition if they got like 1% hp (if thats a possible condition) and 2, and 3
Do a condition if enemy brings at least 1 unit to the location your centing the location on.
Action: Whatever you want...

SilverCrusader
02-22-2008, 9:36 PM
Do a condition if they got like 1% hp (if thats a possible condition) and 2, and 3
Impossible condition.

Evilferret
02-23-2008, 4:50 AM
Durandal - Did you get anywhere on figuring out the corpsefinder? I can't make sense of it for the life of me.

migidu
02-23-2008, 6:01 AM
i think in the corpse finder its like this. you have a location centered on your character, then when an enemy is brought to that location and is killed, the data disc is created in that location. and i think it has random chance to create the data disk. the corpse finder could be used like a unit drops a spoil or a unit evolves like marines to hydra.

Twitch6000
02-23-2008, 10:20 AM
Well this kinds fits both two of your questions it possible with both EUD's(hard) or vHP less hard but, not as great.
A vHP can get the job done however depending on your map type and such it could just make things worse.
Here is a random test rpg of mine.It has a vHP.(btw thanks titanwing for sexing it up)
http://www.starcraft.org/maps/scums/MultiplayerUMS/MultiplayerRPG/Search+And+Destroy!!

Durandal
02-23-2008, 12:41 PM
Yes, but vHP is a little clumsy when you want to detect the hitpoints for any range of units. I remember I once opened corpse finder and got confused, but that was a while ago, so let me dig into it now...