Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: eud unit selection
eud unit selection
May 1 2011, 10:32 pm
By: iCCup.xboi209  

May 1 2011, 10:32 pm iCCup.xboi209 Post #1



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.

May 1 2011, 10:47 pm Roy Post #2

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.




May 1 2011, 11:06 pm iCCup.xboi209 Post #3



the eud links need to be reorganized! ive been reading through some of them and im still confused



None.

May 1 2011, 11:22 pm Roy Post #4

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:
Code
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:
Code
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.




May 1 2011, 11:48 pm iCCup.xboi209 Post #5



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.

May 1 2011, 11:58 pm Roy Post #6

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:
Code
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





May 2 2011, 12:01 am FoxWolf1 Post #7



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.

May 2 2011, 12:03 am iCCup.xboi209 Post #8



ok i think i got it but im gonna reread it again a few times to make sure im good, thanks



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
[2024-4-20. : 7:56 pm]
Oh_Man -- lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
Please log in to shout.


Members Online: Roy