problems with keybinds

problems with keybinds

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
wolas
Posts: 112
Joined: 30 Jul 2010, 20:40

problems with keybinds

Post by wolas »

so is it possible to bind lets say meta + number or whaetever other key V for example + number without trigering existing unit groups?
User avatar
Johannes
Posts: 1265
Joined: 17 Sep 2010, 15:49

Re: problems with keybinds

Post by Johannes »

I'd try it with just uikeys.txt first, without going into any widgets.

just unbind the any+1 group1 commands, then bind them again without the any. Not tested but should work I think.
wolas
Posts: 112
Joined: 30 Jul 2010, 20:40

Re: problems with keybinds

Post by wolas »

unbind Any+1 group1
unbind Any+2 group2
unbind Any+3 group3
bind 1 group1
bind 2 group2
bind 3 group3

unfortunately like this it is not working my widget works correctly only if I unbind group1 also with simple "bind 1 group" I no longer can add unit to group...

So only way is if exists some sorta widget hack....
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: problems with keybinds

Post by Beherith »

isnt bind ctrl+1 group1 good?
wolas
Posts: 112
Joined: 30 Jul 2010, 20:40

Re: problems with keybinds

Post by wolas »

It works...

bottom number is lichos autogroup and upper one is mine instagroup which basically binds any visible unit to group for faster micro(i hope) also it uses 1-6 numbers(can be changed) so no alien fingers needed to pick something like 10

units from instagroup can be selected by space + numbers oldschool groups simply pressing number

Image


unbind Any+1 group1
unbind Any+2 group2
unbind Any+3 group3
unbind Any+4 group4
unbind Any+5 group5
unbind Any+6 group6
unbind Any+7 group7
unbind Any+8 group8
unbind Any+9 group9
unbind Any+0 group0

bind 1 group1
bind 2 group2
bind 3 group3
bind 4 group4
bind 5 group5
bind 6 group6
bind 7 group7
bind 8 group8
bind 9 group9
bind 0 group0

bind Ctrl+1 group1
bind Ctrl+2 group2
bind Ctrl+3 group3
bind Ctrl+4 group4
bind Ctrl+5 group5
bind Ctrl+6 group6
bind Ctrl+7 group7
bind Ctrl+8 group8
bind Ctrl+9 group9
bind Ctrl+0 group0

after few days of testing in normal games will release widget.
Attachments
screen00096.png
(1.54 MiB) Downloaded 3 times
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: problems with keybinds

Post by Beherith »

Tell me more about this autogroup, I dont quite understand what you mean with it. I think I use something similar with a bind on alt+z that selects all units on screen of types already in selection.
wolas
Posts: 112
Joined: 30 Jul 2010, 20:40

Re: problems with keybinds

Post by wolas »

http://springfiles.com/spring/lua-scripts/instagroup

Its for faster picking only one unit actually. Dunno how useful in "real life". Anyway this is my first widget which was not bundled with map.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: problems with keybinds

Post by Beherith »

Take a look at ba's building hotkeys widget to see how I did the bin/unbind on widget enable/disable.
Post Reply

Return to “Lua Scripts”