Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Health Detection
Health Detection
Sep 16 2007, 6:46 pm
By: sharf  

Sep 16 2007, 6:46 pm sharf Post #1



Ok, for a map I'm starting, you can chnage guns. Anyone have an idea of how to transfer the damage from one gun(unit) to another? like a marine, mp5 has 200 hp, gets shot and has 195, switching to ghost shotgun, you have now healed... so unless I use like a VHP, with burrowed units for detection, anyone got an idea of how to do this without using this?



None.

Sep 16 2007, 7:00 pm Money Post #2



Have the real unit be invincible and have a burrowed unit under it that gets attacked?

That is the easiest way I can think of.



None.

Sep 16 2007, 7:02 pm sharf Post #3



yea thats what I was talking about



None.

Sep 16 2007, 7:56 pm fritfrat Post #4



The most common approach is to have the weapons not in use sit in a standby area and to switch them out when you switch weapons. Even though if you switch from marine to ghost your health goes up, you lose the health once you switch back. Atleast it encourages you to use multiple weapons :)



None.

Sep 16 2007, 8:13 pm The Starport Post #5



You can't. You have to use VHP one way or another. Or make it part of the gameplay somehow.

You could use a swarm-based gunner system or something like that if you're desperate.



None.

Sep 16 2007, 9:33 pm Money Post #6



Another creative way is to have a civilian be your health and character and have an invincible weapon stay in a location centered around him. That way it is like you are holding the weapon.



None.

Sep 16 2007, 9:41 pm Sauceover Post #7



^that is extremely difficult to pull off well, just do you know...



None.

Sep 16 2007, 10:00 pm Falkoner Post #8



Tux is right, you need some sort of virtual health system, otherwise it just isn't possible unless you want to use EUD conditions.



None.

Sep 16 2007, 10:30 pm Money Post #9



Quote from Sauceover
^that is extremely difficult to pull off well, just do you know...

It can be made with two triggers:

Trigger("Player 1"){
Conditions:
Always();

Actions:
Move Location("Player 1", "Terran Civilian", "Anywhere", "Area around player");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Bring("Player 1", "Terran Marine", "Area around player", At most, 0);

Actions:
Order("Player 1", "Terran Marine", "Anywhere", "Area around player", move);
Display Text Message(Always Display, "xxxxx Text message if needed xxxxxx");
Preserve Trigger();
}

//-----------------------------------------------------------------//


The only problem is when you attack an enemy unit they will run from the invincible weapon instead of attacking the mortal civilian. One way to get around this is have the civilian be replaced by a unit that does 0 damage. They should attack it instead of running.



None.

Sep 16 2007, 10:54 pm EzDay281 Post #10



You'll still get AI problems if your weapon has less range than your enemy's, and you're idling, as you'll still run from the invincible attacks.
Also, the following weapon can be a severe pain in regards to your own motion, limiting you to air units for weapons.
Actualy, there is a way to detect unit hitpoints, but it's fairly slow, meaning that players would be unable to switch weapons mid-battle, unless you designed a lot of the map around it - move the weapon over to an isolated box, and use triggers to count how many infested terrans/spider mines/scarabs are required to kill it.
edit: similarily, you could use a splashing attack, and count the number of times that the splash occurs. This may work faster.



None.

Sep 17 2007, 12:40 am sharf Post #11



wow.... as Tux said I'm gona need the VHP, thats what I figured. My question was is there an easier method to having like 50 lings under the unit, evidently, not.



None.

Sep 17 2007, 12:54 am The Starport Post #12



Forgot about that solution, Ez. But yeah, it'd be tricky to get it to be practical during a battle. You'd have to add in some weapon switching intermediary or adjust the new weapon's HP while the previous one's is being counted off.

Plus you'd lose the hotkeys to your weapons for each switch.



None.

Sep 17 2007, 2:08 am frazz Post #13



Hey, I have an idea. If all the weapons did the same damage, you could have a marine that just dies every time it gets hit. Then you could keep track of health via a kill score. This may or may not be visually acceptable.



None.

Sep 17 2007, 2:44 am sharf Post #14



Alright alright, I have three methods to try.

1. Have a 1 unit constantly follow your hero, no matter what weapon, if it dies, you die(hero is invinceable)
2. multiple units under it, 10=100 9=90 8=80 etc.
3. Screw the whole thing, and stick to 1 weapon.



None.

Sep 17 2007, 2:09 pm hetzer Post #15



#3 sounds the best.



None.

Sep 17 2007, 7:45 pm Money Post #16



#3 is the best but you can still use multiple weapons. Just make it so you can only switch in selected areas.



None.

Feb 26 2008, 3:26 am stickynote Post #17



This is a super old topic, but I think I know a way. You need a location the approximate size of a weapon's attack range. Do this for every weapon. Then you need to check which unit the player attacking you has and check whether or not they bring that unit within the attack range for that weapon. In your weapons holding area, create the appropriate weapon to attack your weapons so that they have the same health. This is obviously buggy, but it's the best I can think of.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[06:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[04:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
Please log in to shout.


Members Online: Roy