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.
[02:27 am]
Symmetry -- https://staredit.net/topic/18903/ THE REVIEWS ARE HERE! "ok these are pretty good memes" - ssj9Kevin
[2026-7-17. : 2:58 pm]
Ultraviolet -- Symmetry
Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
fr fr
[2026-7-17. : 2:39 am]
Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
[2026-7-16. : 6:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
[2026-7-16. : 6:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[2026-7-16. : 6:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
[2026-7-16. : 2:28 am]
Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
[2026-7-16. : 2:28 am]
Symmetry -- Ohhh imagine a SC map that could delete itself
[2026-7-15. : 8:51 pm]
NudeRaider -- Symmetry
Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
[2026-7-15. : 4:10 am]
Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
Please log in to shout.


Members Online: O)FaRTy1billion[MM]