I think you can detect HP in multiplayer maps, but the problem is that you have to know the indices of the units, so if you're creating new units, that will be problematic because you won't know their indices.
Yeah, you'll want to preplace the units. It is possible to find a unit's index after it's been created, but
that's a little more complicated.
A unit index is basically just a unique number between 0 and 1699 that every unit on the map gets. After a unit dies, its index can be reused on a future unit. You know how the game says "Cannot create more units" if there's 1700 units on the map already? It's because it ran out of unit indexes to assign to new units.
Opening EUDGen2 will show you the stuff you can detect. Every condition there can be used in multiplayer, except for the stuff in the "Local" tab.
The two most important things to note (you may want to open SCMDraft2 to look at these features):
1) EUDs regarding a unit (like checking its HP) requires the unit's index. In EUDGen2, it'll ask for the index. You can see the unit indexes in SCMDraft2, just double-click any unit to open the Properties window. One of the columns there shows unit indexes.
2) The unit indexes shown in SCMDraft2 can be made inaccurate. You'll notice you can't change which range of indexes the units use, you can only swap them within that range; if you have 50 units on the map, SCMDraft2 forces you to use the indexes 0 to 49. That's because StarCraft uses the 0 index first, then 1, then 2, etc.
That being that case, let's say that you make a map with 10 units. They have indexes 0 to 9. Now let's say Unit 0 and Unit 1 are owned by Player 1. If you play this map in multiplayer, but there is no Player 1, what happens? It doesn't create Player 1's units, like usual, so Unit 0 and Unit 1 don't exist. Now it will create Unit 2, except it has to start at index 0, so Unit 2 in SCMDraft2 will now become Unit 0 in-game.
This only happens when the units are being created, of course. Once it's created, a unit's index will never change.
Easy solution to this: In SCMDraft2, put the preplaced units you want to check in the lowest indexes, starting at 0. Make these units owned by Player 12 (or a computer player), who will always be in the game (so the units will always be created). When the game starts, give the units to the players that are supposed to have them.
If there's 3 heroes, because it's a 3-player map, you can give them indexes 0, 1, and 2. That should make life fairly easy for you.
Special note: Unlike basically everything else (including Map Revealers), Start Locations never actually exist in-game, and therefore never get a unit index. Every index higher than a Start Location is actually one lower because of this, so it's generally least confusing to just move Start Locations to the highest indexes in SCMDraft2 (which is easy to do, since you can select them all at the same time and move them).
This program is what really makes EUDs accessible to anyone, they used to be needlessly complicated. It took all the math out of the equation. The guide is also pretty good, I'm sure everything I mentioned here is explained there as well
If it seems complicated, it's because you're still unfamiliar with the implementation (like trying to understand Conditions and Actions before opening the Trigger Editor). I'd suggest opening EUDGen2 and looking through it, it's styled similarly to normal StarCraft triggering. Once you've created your first EUD, the process should be pretty intuitive for you.
Let's say you want to detect a unit's HP, and then add 100 HP. Is this possible for a multiplayer map?
Absolutely.
Post has been edited 2 time(s), last time on Aug 12 2013, 8:12 am by Azrael.