ok so im a little bit nooby when it comes to eud cause i only figured out how to find the address for minerals and gas. I simply need a trigger for players 1-7 to detect if they selected something, I already know the unit i want selected has to be preplaced btw.
None.
An artist's depiction of an Extended Unit Death
Please use the search feature and check pinned topics before posting new topics.
http://www.staredit.net/topic/7993/http://www.staredit.net/topic/10471/6284E8 161889 P1 FIRST SELECTION ID (SHARED): (Pointer to unit, see below)
6284EC 161890 P1 SECOND SELECTION ID (SHARED): (Pointer to unit, see below)
...
628518 161901 P2 FIRST SELECTION ID (SHARED): (Pointer to unit, see below)
62851C 161902 P2 SECOND SELECTION ID (SHARED): (Pointer to unit, see below)
...
628548 161913 P3 FIRST SELECTION ID (SHARED): (Pointer to unit, see below)
62854C 161914 P3 SECOND SELECTION ID (SHARED): (Pointer to unit, see below)
... (for address: +0x30; for extended player: +12)
Pointer to Units (x = unit index):
if x = 0: 5885096
if x >= 1: 6455960 - 336(x-1)
You can find more details on selection EUDs by looking at the other EUD links if the above isn't enough.
the eud links need to be reorganized! ive been reading through some of them and im still confused
None.
An artist's depiction of an Extended Unit Death
For what I showed above, you should be able to understand how to make an EUD trigger for this. If your unit is at index 1 and you want to see if player 1 has it selected, it would be:
Memory at +161889 is exactly 5885096
It's essentially like this:
Memory at +XXXXXX is exactly YYYYYYY
Replace
XXXXXX with:
Player 1: 161889
Player 2: 161901
Player 3: 161913
Player 4: 161925
Player 5: 161937
Player 6: 161949
Player 7: 161961
Player 8: 161973
Replace
YYYYYYY with:
UNIT ID 1: 5885096
UNIT ID 2: 6455960
UNIT ID 3: 6455624
UNIT ID 4: 6455288
UNIT ID 5: 6454952
UNIT ID n: 6455960 - 336*(n-1)
I really don't know how else to explain it, so I hope you understand.
What about the Y? It only went up to 5, and how do i know if my unit is at index 1? and what about other indexes(if there are any)
None.
An artist's depiction of an Extended Unit Death
Unit index = UnitID. Based on the order you preplace the unit, it gets assigned an ID. In SCMDraft, you can right-click -> Properties to see a unit's ID.
I hope you understand the arithmetic I posted. "
6455960 - 336*(n-1)" can be used to calculate any Unit ID by substituting "n" for the number you want. SC has up to 1700 Unit IDs, and I'm not going to manually post them all here.
For selection indexes, you simply add 1 to the memory value for the next selection index. For example, Player 1's indexes are:
Selection Index 1: 161889
Selection Index 2: 161890
Selection Index 3: 161891
Selection Index 4: 161892
Selection Index 5: 161893
Selection Index 6: 161894
Selection Index 7: 161895
Selection Index 8: 161896
Selection Index 9: 161897
Selection Index 10: 161898
Selection Index 11: 161899
Selection Index 12: 161900
The upgraded unit properties dialogue box in the latest (last?) version of SCMDraft 2 (which can be obtained from the thread in the Mapping Tools forum) has a column labeled "index". That gives you the unit ID that you can put into the formula given.
The way we used to do it, which you can use if you will not understand the more modern method, is to select the unit that you want to make the EUD for in game, then look in the memory location for your player's selection group using ArtMoney or another memory reader, to obtain, directly, the value to be detected. This method isn't really required anymore, but if you're desperate, it will work.
Be sure that all preplaced units belonging to players who are sometimes, but not always in the game at the beginning are later in the unit order than the one you want to detect; otherwise, its place in the unit order will change based on whether the players with the earlier units are there, and your EUDs will fail. I found this one out the hard way, back when there wasn't an easy way to shuffle the unit order around.
Also, bear in mind that the X values given will only be for the first spot in the selection group. For each subsequent spot, add one. So the 12th spot in the selection group for player 1 would be at 161900. If you want your triggers to disregard position in the selection group, you need 12 times as many triggers.
EDIT: Blargh, Roy was faster.
Post has been edited 1 time(s), last time on May 2 2011, 12:28 am by FoxWolf1.
None.
ok i think i got it but im gonna reread it again a few times to make sure im good, thanks
None.