Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Unit movement w/ buildings?
Unit movement w/ buildings?
Jan 29 2009, 11:35 pm
By: Hug A Zergling  

Jan 29 2009, 11:35 pm Hug A Zergling Post #1



I'm trying to think of a way to control a vehicle with keys. I know it's been done before, but how would you be able to move it left in right properly? For the proper control, I think I would need a way to tell the unit to move in a certain direction until the button is released, how do other map makers do this? Or do they have to constantly have to button mash to get the unit to move in that direction?
Sorry if I'm confusing, it's been awhile since I've been in UMS Assistance.



None.

Jan 29 2009, 11:38 pm ForTheSwarm Post #2



You make it go left/right through mobile grids.

I think you'd have to button mash. Or you could tell the unit to keep moving until you press the button a second time.



None.

Jan 30 2009, 1:55 am pneumatic Post #3



I don't think there's any way to detect if a key is being held down, because SC detects a press and does the action without you even releasing the button.

But as ForTheSwarm said, you can tell it to continue moving and use the current direction as the stop key. You could also have a universal "stop" button. To make the unit continue moving, use mobile grids to extend the destination location out to the edge of the map, or at least to the edge of the walkable area, and order the unit to move to that location. This could be tricky though, considering unit pathfinding, so maybe it'd be better for the location to have a limit to its distance.

A Starport would work well since it can build 5 units. One of these could be the "stop" button and the other four could be directional.

You can also combine directions. Detect whether or not two directions were pressed within a certain amount of time. If North and West were pressed within half a second, for example, set the direction as NW. You could even use smaller increments -- if the player presses North, North, and West within the detection time, the direction could be North by Northwest. A little trickier to do with mobile grids, but still possible. The detection time would have to be pretty short, otherwise quick maneuvering of the unit would be impossible. Not good in a battle situation.




Jan 30 2009, 2:25 am Hug A Zergling Post #4



I don't necessarily need to be holding down the button, it could be another method.



None.

Jan 30 2009, 2:28 am FoxWolf1 Post #5



If you want to be able to hold down the key rather than mash it, you're going to need to go with EUD controls. Selection detection will work, provided that you unselect the unit every time that its selection is detected and keep the control unit near the unit being moved (to accommodate the vision-centering effect of holding down a hotkey). Of course, you'll need to do this under WIndows...



None.

Jan 30 2009, 2:32 am Hug A Zergling Post #6



Oh, I have a shitty 2 gig 98 laptop im working off of :)
I was hoping for something rather then EUD's, but I guess that will make it the "cleanest"



None.

Jan 30 2009, 3:08 am pneumatic Post #7



I'd go with my method (read above).

If you use EUDs you risk the map breaking every time a patch comes out. I also don't think it'd be the "cleanest", at all. You'd have to keep the control unit near your playing unit, and there'd be the jittery effect of the screen constantly being centered.



None.

Jan 30 2009, 3:17 am Morphling Post #8



Why not just have two simple triggers:

C:Commands 1 Marine
C:Death Counter A is 1

A:Remove Marine
ASet Death Counter A to 0
A:Stop moving the unit
A:Preserve

C:Commands 1 Marine
C:Death Counter A is 0

A:Remove Marine
ASet Death Counter A to 1
A:Do whatever to move the unit
A:Preserve

When you create a Marine via Barracks the unit will move using your choosen method of transporting the unit, lets say right, it will constantly be moved right via anyway you choose untill you make another marine to stop it producing the same effect as if holding down a key.

Post has been edited 1 time(s), last time on Jan 30 2009, 3:27 am by Morphling.




Jan 30 2009, 4:59 am Hug A Zergling Post #9



Quote from Morphling
Why not just have two simple triggers:

C:Commands 1 Marine
C:Death Counter A is 1

A:Remove Marine
ASet Death Counter A to 0
A:Stop moving the unit
A:Preserve

C:Commands 1 Marine
C:Death Counter A is 0

A:Remove Marine
ASet Death Counter A to 1
A:Do whatever to move the unit
A:Preserve

When you create a Marine via Barracks the unit will move using your choosen method of transporting the unit, lets say right, it will constantly be moved right via anyway you choose untill you make another marine to stop it producing the same effect as if holding down a key.
I thought of that, but I think that would be even more annoying then button mashing. This was going to have driving aspects to it, too difficult for driving.



None.

Jan 31 2009, 4:54 am Falkoner Post #10



Hmm... You could have a control where you order a unit, and depending on which direction it goes, the vehicle goes, but you keep teleporting the unit back and ordering it to go the same direction, to change directions you click another way, and to stop you hit the stop button for the unit.



None.

Jan 31 2009, 4:16 pm Hug A Zergling Post #11



But then you wouldn't be able to see the unit and the vehicle at the same time.



None.

Jan 31 2009, 6:10 pm Falkoner Post #12



Yeah, the unit can be in the center of the map, and they can use the minimap for controls.



None.

Jan 31 2009, 6:14 pm Brontobyte Post #13



Here is a map I made that changes the direction of a Protoss Corsair by means of pressing the hot keys of units made in a Terran Barracks. I think this will be helpful.



None.

Jan 31 2009, 7:44 pm Pigy_G Post #14



If the map is solo player, you could control the unit with the arrow keys via screen detection. (EUD)



None.

Jan 31 2009, 7:52 pm Brontobyte Post #15



Quote from Pigy_G
If the map is solo player, you could control the unit with the arrow keys via screen detection. (EUD)

That makes no sense. You would have to move your screen to make the character move... Think about it. Plus you would need to come up with some ridiculous way of detecting if the screen was moved up, down, left, right, or any of the four diagonals. Creating units with a unit building factory seams like the best way to go here.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
[06:38 pm]
Vrael -- I need a go-to solution and someone who understands that Carpets are more than just decorative elements in my home.
Please log in to shout.


Members Online: Roy