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.
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.
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.
I don't necessarily need to be holding down the button, it could be another method.
None.
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.
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.
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.
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.
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.
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.
But then you wouldn't be able to see the unit and the vehicle at the same time.
None.
Yeah, the unit can be in the center of the map, and they can use the minimap for controls.
None.
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.
If the map is solo player, you could control the unit with the arrow keys via screen detection. (EUD)
None.
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.