Jump to content


Help with "deselect one" hotkey in Starcraft 2 gam


  • Please log in to reply
3 replies to this topic

#1 geevys

geevys
  • Guests

Posted 13 December 2011 - 05:06 AM

Hi I attempted to make a starcraft 2 hotkey to deselect one unit from the current control group by ctrl-right clicking the first portrait where your army preview is and then patrol moving(p) and then queueing a stop command(s):

;---------- Caps lock + Right Click: deselect one and patrol into hold position ----------;
CapsLock & Rbutton::
MouseGetPos, x, y ;save mouse position a
Send {p} ;p then leftclick to patrol-move army
send {Click}
Send +{Click 577, 889} ;shift+left click at portrait
Send +{h}; queue a hold after moving to position
MouseMove, %x%, %y% ;move mouse back to a

Works well in single player, but for some reason in multiplayer the macro will make the camera jump back to the base. Caps lock is not currently set as a hotkey in starcraft, but space is.

Basically I'm not sure why this hotkey seems to make the jump to base action/space bar active, but I also don't quiet understand why it works in a vs the computer game by myself, but not online multiplayer.

This is my first attempt at a hotkey, so if theres a better way to be doing something, let me know! :)

#2 geevys

geevys
  • Guests

Posted 13 December 2011 - 05:10 AM

Also I'm using:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode InputThenPlay  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


#3 Guests

  • Guests

Posted 13 December 2011 - 05:10 AM

Hi I attempted to make a starcraft 2 hotkey to deselect one unit from the current control group by ctrl-right clicking the first portrait where your army preview is and then patrol moving(p) and then queueing a stop command(s):

;---------- Caps lock + Right Click: deselect one and patrol into hold position ----------;
CapsLock & Rbutton::
	MouseGetPos, x, y  ;save mouse position a
	Send {p}  ;p then leftclick to patrol-move army
	send {Click}
	Send +{Click 577, 889}  ;shift+left click at portrait
	Send +{h};  queue a hold after moving to position
	MouseMove, %x%, %y%  ;move mouse back to a

Works well in single player, but for some reason in multiplayer the macro will make the camera jump back to the base. Caps lock is not currently set as a hotkey in starcraft, but space is.

Basically I'm not sure why this hotkey seems to make the jump to base action/space bar active, but I also don't quiet understand why it works in a vs the computer game by myself, but not online multiplayer.

This is my first attempt at a hotkey, so if theres a better way to be doing something, let me know! :)


Sry didn't put the code tags on.

#4 Marky14

Marky14
  • Guests

Posted 31 May 2012 - 07:35 PM

I would check your key set-up. {backspace} is the default to cycle thru your bases. Maybe you have another key or added a secondary key that is included in your script. I think using the caps lock as a hotkey can be problematic. I'd avoid it.

What other scripts do you have for SC2?