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.
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[2024-4-16. : 4:31 pm]
Zoan -- where's the option to delete my account
[2024-4-16. : 4:30 pm]
Zoan -- goodbye forever
Please log in to shout.


Members Online: Roy, Judcfrffvf