Ctrl: selection rectangle subtracts from existing selection
Shift: selection rectangle adds to existing selection
Alt: filter selection to only non-builder mobile combat units
Space: filter selection to only idle units
Z: filter selection to only already-selected unit types
Changelog: 1.0:
initial release
1.1:
minimap selection now supported
removed bug where you were able to select by click+dragging the mouse with a command active
1.11
fixed single click selection bug
1.12
fixed clicks blocked by other widgets causing units to be selected
1.13
no longer select buildings with weapons when alt is held
1.14
added lookup table to greatly improve performance when filtering combat units on large selections
1.2:
added Z meta key - when held, it filters new selections to only include currently selected unit types. it stacks with shift and alt.
when dragging a selection over both mobile units and buildings, just select the mobile units (not the buildings) unless shift is held
added options for both of the above additions a config section at the top of the widget file - selectBuildingsWithMobile and sameSelectKey
added selection box drawing on map when selecting through minimap
fixed minimap selection over sky
fixed flickering with some selection types and UnitShapes
1.21:
added support for dualscreen minimap
1.22:
added support for TraceScreenRay sky patch
1.3:
ctrl no longer subtracts from selection when you start with no units selected. this makes it possible to be holding ctrl to assign a unit group while you are dragging to select units
widget now works for spectators
1.35:
if filters reduced the selection to nothing, now select nothing instead of everything in the box.
added an idle unit filter, bound to the space key by default. this removes stationary non-builders and any other mobile or builder unit with orders queued from the potential selection.
1.36:
possibly fixed a bug very rarely causing single clicks to fail to select units
next step is figuring out how to track offscreen selection position on camera angle change without using the terrain as reference point... because TraceScreenRay to terrain does nothing when there's no terrain there.
then I'll make selecting in minimap show a white selection box on terrain
You should merge the functionality of 'Z selector' into this widget (When Z is held, only units types that existed in original selection are selected), should be easy as its very similar to your combat filter. Good work btw
ah yeah that shouldn't take very much code... right now I'm working on a better way to calculate the original selection point (right now it depends on terrain, so doesn't work if you start your selection in the sky)
1.22 released: added support for this patch to allow TraceScreenRay in sky, which allows realtime selection when the selection rectangle originates in sky as well as ground
just needs dev approval and a new version of spring released before it's fixed
anybody have any suggestions for sweet new features to add or functionality I should refine? I'm open to implementing anything awesome, even if it takes a bit of work.
I was thinking it'd be possible to extend this to area commands as well... I could start with area reclaim, and hook smart area reclaim into this so dragging your area reclaim would highlight what it was you were going to reclaim, hotkeys could modify for metal/energy/both, and it could have similar behavior to current smart_area_reclaim widget except highlighting features in realtime like this selection engine (I even know how to implement drawing a real area reclaim command in the middle of the queue now... so I can do smart_area_reclaim without command spam too)
Holding shift while clicking a selected unit does not deselect it from the group. This is normal RTS behavior. I suspect this widget would do it with ctrl, but I still keep trying with shift because that's how it works in most games...
when you click a single unit, this widget doesn't do anything. this widget only kicks in when you drag your mouse. spring has always used control for that.
*sigh* I'll make it configurable at the top of the widget the current buttons (ctrl/shift) were closer to spring's defaults though (ctrl just deselects now instead of fully inverting selection... I made this change because there was no good way afaik to deselect a chunk out of a big section of mixed selected/deselected units)
Hmm, sounds nice. I'm having some problems getting it to work though (and im a lua noob/normal user). The functions described above don't work, yet when the widget is enabled the normal keys Do I have to add the keys i want to use in? In the user config section?
Users browsing this forum: No registered users and 5 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum