Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: How do I move a location to the selected unit?
How do I move a location to the selected unit?
Jul 28 2021, 2:38 am
By: Scrapper  

Jul 28 2021, 2:38 am Scrapper Post #1

Terran Goliath

As the title says, I'd like to move a location to the selected unit. If anyone knows of a tutorial or can guide me through it, it'd be greatly appreciated!




Jul 28 2021, 10:01 am NudeRaider Post #2

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

move location 'center' on 'terran marine' at 'anywhere'




Jul 28 2021, 1:40 pm Dem0n Post #3

ᕕ( ᐛ )ᕗ

Yeah, you use the "Move Location to Unit" action or whatever it's called. One thing to note is that if there's duplicate units in the area you're trying to move your location to, it will always get moved to the leftmost unit.




Jul 28 2021, 2:41 pm Scrapper Post #4

Terran Goliath

So I'm using firegraft to add a stimpack button to various units. When they click stim, it will check for duplicates of the stimmed unit, but I don't know how to detect that specific unit. The classic conditions don't have a way to check if unit is stimmed or check for which unit is highlighted.

So you guys are saying if I set move location to anywhere, it defaults to the selected unit? (Player will only be able to select one unit at a time)




Jul 28 2021, 3:20 pm NudeRaider Post #5

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

Oh sorry didn't realize you want it to target the selected unit. So no, the center location action picks the leftmost unit, regardless of selection.

The EUD DB says it's this offset: 006284B8 (address), 161877 (PID) 1.16.1 Current Player Selection

But I'm sure the EUD Editor has a convenient trigger you can just choose.




Jul 28 2021, 4:21 pm tscape16 Post #6



I wouldn't suggest using 'anywhere' to center another location. You should create a large location which covers the map, such as 'total area', that doesn't encompass units you don't want it focused on. In the case of DBZ maps, you'll have multiple forms, but only control one at a time. You'd want that location centered on the same location when in use, so I use 'all men' instead of specific unit as well.



None.

Jul 28 2021, 6:17 pm Scrapper Post #7

Terran Goliath

Quote from NudeRaider
Oh sorry didn't realize you want it to target the selected unit. So no, the center location action picks the leftmost unit, regardless of selection.

The EUD DB says it's this offset: 006284B8 (address), 161877 (PID) 1.16.1 Current Player Selection

But I'm sure the EUD Editor has a convenient trigger you can just choose.

I'll give that a try when I get home. Thank you




Jul 28 2021, 6:51 pm Luigi Post #8

In God I trust.

Quote from Scrapper
So I'm using firegraft to add a stimpack button to various units. When they click stim, it will check for duplicates of the stimmed unit, but I don't know how to detect that specific unit. The classic conditions don't have a way to check if unit is stimmed or check for which unit is highlighted.
I'm not sure what you are trying to do. But you should add a condition for when the player presses hotkey "T" when a unit is selected. And for keyboard input detection you need EUD as well.

Post has been edited 1 time(s), last time on Jul 28 2021, 7:53 pm by Luigi.



I'm the creator of StarCraft Adventures.
For Spanish version "Aventuras de StarCraft":
Aventuras de StarCraft (blog)

Jul 28 2021, 7:09 pm Scrapper Post #9

Terran Goliath

I'm using this to combine duplicate units to a better unit. Player 1 has 2 marines, create 1 goliath. I want use a button on the selected marine though, as these units are not mobile. This is a defense game




Jul 28 2021, 7:58 pm Luigi Post #10

In God I trust.

Quote from Scrapper
I'm using this to combine duplicate units to a better unit. Player 1 has 2 marines, create 1 goliath. I want use a button on the selected marine though, as these units are not mobile. This is a defense game
Now I understand a little better. In that case I think you want to check for 2 selected Marines and when the button in the command card is pressed.



I'm the creator of StarCraft Adventures.
For Spanish version "Aventuras de StarCraft":
Aventuras de StarCraft (blog)

Jul 28 2021, 8:26 pm Scrapper Post #11

Terran Goliath

Quote from Luigi
Quote from Scrapper
I'm using this to combine duplicate units to a better unit. Player 1 has 2 marines, create 1 goliath. I want use a button on the selected marine though, as these units are not mobile. This is a defense game
Now I understand a little better. In that case I think you want to check for 2 selected Marines and when the button in the command card is pressed.

I have made them single entities so only one can be selected at a time. I did this because I want the newly created unit to be created in place of the selected unit and they cannot move.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-7-18. : 2:27 am]
Symmetry -- https://staredit.net/topic/18903/ THE REVIEWS ARE HERE! "ok these are pretty good memes" - ssj9Kevin
[2026-7-17. : 2:58 pm]
Ultraviolet -- Symmetry
Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
fr fr
[2026-7-17. : 2:39 am]
Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
[2026-7-16. : 6:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
[2026-7-16. : 6:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[2026-7-16. : 6:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
[2026-7-16. : 2:28 am]
Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
[2026-7-16. : 2:28 am]
Symmetry -- Ohhh imagine a SC map that could delete itself
[2026-7-15. : 8:51 pm]
NudeRaider -- Symmetry
Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
[2026-7-15. : 4:10 am]
Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
Please log in to shout.


Members Online: Symmetry