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.
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:
None.
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.
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.
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.
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.
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.
Ah, missed your link. Multiplying the amount of health you want to check for by 256 does the trick.
None.
Also you must take into account the possible values of the first byte... So (using your trigger to base this on):
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!
This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!
Thanks everyone, I did what you guys said, I understand it, And its really simple ^-^, Thanks for all the help guys.
None.