An artist's depiction of an Extended Unit Death
I think I can explain the map, since I'm the one who made it.
Basically, I have several triggers that check a memory address that stores a unit's facing direction. If the unit is facing directly up, for example, the value at the address is
0. So, in a trigger, I say "If the value at this address is
0, then set a variable saying the unit is facing up." (I use a death count for a variable, where 1 = up, 2 = up-right, etc. So I would be setting the variable to 1 in this case).
Now, the values for facing up are actually a large range, and for any number between
0 and
225929599, the unit is still facing up. Therefore, my conditions would have to say "If the value at this address is between
0 and
225929599, then set a variable saying the unit is facing up."
Now, the address itself you can't actually get by normal means. There is no "Unit is facing direction" condition. However, you can think of EUDs as a way of accessing information that you wouldn't normally have access to. Using a memory reader on StarCraft while making a unit face various directions, I found the address to be
59CCF0 for the unit of interest (you can also figure this out if you know the unit placement order for your map; in this case, it was the first unit to be placed on the map).
Now, this hex number
59CCF0 doesn't do us very good, does it? However, we can convert this address either manually or using a useful program by Farty called EUDTrig. In EUDTrig, you can simply input the address 0x
59CCF0 (we put 0x in front because it's a hexadecimal number, meaning it includes the letters A-F in the number). Checking the "Use Extended Player Deaths" box and hitting the arrow pointing down, the program converts the address to a number we can use (
19043). In this case, it is the player number we put into the editor to access this address.
So, basically, the number
19043 represents the spot in memory that basically says "This is the direction the unit is facing." Using SCMDraft's memory condition, we can put in the number
19043. As for the second number to input, we put the value of the address, or the number that represents which way the unit is facing. As I mentioned above, facing up is the values between
0 and
225929599.
A trigger that displays when the unit is facing up would look like this:
Player 1Memory at 19043 is at least 0Memory at 19043 is at most 225929599Display Text: "Your unit is facing up!"Preserve Trigger * I think it should be noted that all units' default facing value is 0, so this will always run at the beginning of the game.You can do this for all directions you want to detect. A great page for getting rough numbers for each direction is the one Aristocrat already linked you to,
http://www.staredit.net/topic/10362/Direction is just one of many EUD triggers. With EUD detection, you can detect things otherwise unimaginable for StarCraft's limited editor capabilities. Typed text, player names, mouse position, and many more detections are possible with EUDs, if you're determined enough to understand them.
Post has been edited 1 time(s), last time on Aug 30 2010, 11:42 pm by Roy.