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.
[05:04 am]
O)FaRTy1billion[MM] -- sorry wing
[05:03 am]
O)FaRTy1billion[MM] -- it was "delete[07:44 pm] Wing Zero -- I mean... It's true tho"
[05:03 am]
O)FaRTy1billion[MM] -- i think i accidentally deleted a shout by mstake
[01:15 am]
Vrael -- Generalpie
Generalpie shouted: Vrael Banger shout
thank you sir
[01:14 am]
Vrael -- NudeRaider
NudeRaider shouted: Espeneo want to steal the burger formula?
I am also confused old buddy
[11:10 pm]
Roy -- How can anyone take Gaius seriously when his theme song is literally Happy Birthday to You?
[10:46 pm]
Generalpie -- Frame it
[10:46 pm]
Generalpie -- Vrael
Vrael shouted: if starcraft has lost its charm and you need a project I hear deepfake porn anime celebrity furry crossovers are a lucrative business
Banger shout
[10:22 pm]
O)FaRTy1billion[MM] -- ya
Please log in to shout.


Members Online: sawyer_powell_98, jun3hong, allen_jacob_86