Author Topic: numbers below units, build 1 to 9 with one click  (Read 1146 times)

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 487
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
numbers below units, build 1 to 9 with one click
« on: 14 February 2016, 04:07:56 »
Right now, clicking on a barracks, and then clicking on the swordman icon will build 1 swordman.

What if there was a number (0-9) below each unit icon? I could change that number to 3 by clicking an up or down arrow, so that every time I click the unit icon, it would add 3 units to the production queue. Later in the game, if I want to change it back to 1, or to 9, I could click the up or down arrow above and below the number.


Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: numbers below units, build 1 to 9 with one click
« Reply #1 on: 22 April 2016, 08:24:30 »
Proper hotkeys would solve this problem and make the game much more enjoyable.
WiP Game developer.
I do danish translations.
"i break stuff"

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 487
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
Re: numbers below units, build 1 to 9 with one click
« Reply #2 on: 25 April 2016, 18:29:48 »
In the meantime, I've made a couple of my own key bindings

I set up keyboard shortcuts to execute these scripts:

Alt-1 will run this script during the game:
Code: [Select]
#!/bin/sh
# 1st-unit.sh 20160425.1
# After a building has been selected, will move the mouse to
# the first unit and simulate a single-mouse click.
#
# This uses 'xmacroplay', included in the "xmacro" package found
# in most *nix distributions.
# The x & y coordinates for MotionNotify will depend on the
# players resolution, and can be found using xmacrorec2 from
# the "xmacro" package.

echo -e  "MotionNotify 1112 239" | /usr/bin/xmacroplay :0
echo -e "ButtonPress 1" | /usr/bin/xmacroplay :0
echo -e "ButtonRelease 1" | /usr/bin/xmacroplay :0

exit $?

assigned to Alt-4
Code: [Select]
#!/bin/sh
# 4clicks.sh 20160425.1
# simulate left-click 4 times
#

for i in 1 2 3 4

do

  echo -e "ButtonPress 1" | /usr/bin/xmacroplay :0
  echo -e "ButtonRelease 1" | /usr/bin/xmacroplay :0
  sleep 1s

done
exit $?
« Last Edit: 25 April 2016, 18:57:12 by andy_5995 »