Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: EUD unit Health Detection Problem.
EUD unit Health Detection Problem.
This topic is locked. You can no longer write replies here.
Feb 9 2009, 12:52 pm
By: Keirebu  

Feb 9 2009, 12:52 pm Keirebu Post #1



Well, I made a little test map for some EUD practice, So I made the game, found the HP address for the marine, put it in EUDTrig, got the P# And Unit ID, Made the Condition for the trigger, and set it to desplay a text message when the unit is fully healed and or at 35 hp (max 40). Here is what my triggers look like.
Code
Trigger("Player 1"){
Conditions:
    Deaths("Player 8", "UnitID:13471", Exactly, 40);

Actions:
    Display Text Message(Always Display, "Marine is at Full HP");
    Preserve Trigger();
}

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

Trigger("Player 1"){
Conditions:
    Deaths("Player 8", "UnitID:13471", Exactly, 35);

Actions:
    Display Text Message(Always Display, "Marine is at 35 HP");
    Preserve Trigger();
}

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

Note: I only used Trigedit to copy and paste, not to actually make them.
Marines HP Offset:0x628151
Heres the Map if you want to look at it,

Attachments:
EUDTest.scm
Hits: 3 Size: 40.45kb



None.

Feb 9 2009, 2:07 pm NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

I'm pretty sure you can't check for 40/35 deaths to detect 40/35 hp.
Maybe this sheds some light on it.




Feb 9 2009, 2:11 pm Elvang Post #3



Isn't health stored as a float since 0 damage or less damage done than armor present equals a 0.5 reduction to health?



None.

Feb 9 2009, 2:12 pm NudeRaider Post #4

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

The actual hp value is 2x of what you see in sc. No float.




Feb 9 2009, 2:20 pm Elvang Post #5



I changed the trigger to detect 80 and 70 deaths, and also turned off randomized start. Still didn't detect it, either your offset is wrong or the order you placed the units on the map is wrong.



None.

Feb 9 2009, 2:42 pm NudeRaider Post #6

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

if you could check for 80/70 deaths I would have said that, don't you think?
It's more complicated because sc stores it in 2-4 byte long variables, plus the regeneration information for shield/zerg hp. You should check the link I provided.




Feb 9 2009, 2:51 pm Elvang Post #7



Ah, missed your link. Multiplying the amount of health you want to check for by 256 does the trick.



None.

Feb 9 2009, 9:51 pm O)FaRTy1billion[MM] Post #8

👻 👾 👽 💪

Also you must take into account the possible values of the first byte... So (using your trigger to base this on):

Code
Trigger("Player 1"){
Conditions:                                             // X = 40
   Deaths("Player 8", "UnitID:13471", At Least, 10240); // X*256
   Deaths("Player 8", "UnitID:13471", At Most, 10495);  // (X+1)*256-1


Actions:
   Display Text Message(Always Display, "Marine is at Full HP");
   Preserve Trigger();
}

The first byte is a timer (for regen) or fractional value. The next 3 are the HP that is shown and used. Shields act the same, but are a different value.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Feb 9 2009, 10:43 pm Keirebu Post #9



Thanks everyone, I did what you guys said, I understand it, And its really simple ^-^, Thanks for all the help guys.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[04:30 pm]
Oh_Man -- yeah, probs
[03:11 pm]
NudeRaider -- I bet it just needs another training session against pros instead of only against itself and nobody will be able to stop it anymore.
[03:09 pm]
NudeRaider -- Oh_Man
Oh_Man shouted: pluto vs pro gamer snow: https://youtu.be/NOXXpATkdZU
so it can be beaten by a prepared pro, even in macro games, if only barely. the muta micro in particular seems really hard to handle for protoss ground though. In the open goons can't catch them, in the base they trip over buildings, it just instantly flies out of storms and they fly circles around archons. Mass cannons do work, but can't cover the whole map with it. Probably need mass corsair to counter and hope you can outmaneuver all the scourge.
[02:14 am]
Oh_Man -- pluto vs pro gamer snow: https://youtu.be/NOXXpATkdZU
[2026-9-25. : 2:22 pm]
Oh_Man -- https://youtu.be/Lfo4C0xzU04
[2026-9-25. : 12:00 am]
Oh_Man -- he hasnt won a single game so far this is hilarious
[2026-9-24. : 11:41 pm]
Oh_Man -- new arty username Rage Against The Machine
[2026-9-24. : 10:14 pm]
Oh_Man -- https://m.youtube.com/watch?v=KPXri8q9ZBs artys vsing the bot now
[2026-9-24. : 8:12 pm]
Ultraviolet -- do you even lift bro?
Please log in to shout.


Members Online: UndeadStar, Oh_Man