I stumbled upon a picture, where someone added a 3rd button next to all-army-select (the hotkey was something like s+w). I want to create a button, which doesn't select the whole army on the map, but close to it. Either only fighting units (excluding Observers), or only attacking/idle units (excluding units on patrol/hold position), or maybe only all units visible on the screen. It can be mapped to whatever, F2, F3 or some combination. Because players find the current functionality of the F2 key rather inconvenient.
Is this possible? Where would I start? Is this done with data editor, or triggers? Anyone tried it yet?
I managed to realize the army selection of units not on patrol and hold position. In case someone want's to recreate it, that's what I have done:
1) A Validator combining 2 Validators: Unit Order Queue. Both have Move in the Validator: Ability field, and in Validator: Ability Command one has the value 1 for patrol and the other 2 for hold position. Because in the Move-Ability there are hold, stop, patrol and a few others combined, they can be accessed through ability command.
2) A Behavior on each and every unit with the Validator from above in the Validator (Disable) field.
3) A trigger, which first adds all units into one unit group, iterates over this group and checks with UnitBehaviorCount() for this behavior, adds these into a second unit group and finally substracts the units in the second group from the first.
Looks easy now, but took some time to explore all these weird behaviors of the triggers and validators and abilities.....
Now I wanted to also make a button to select all army, which the user sees with his current screen position. I would need to know where he looks at. Is there such a Trigger? Because I can't find any...
I copied the Trigger and the UI thingy (took me a while, since I haven't touched UI before), and it worked fine. Then I tried renaming it, so it's not called "new army button". Stopped working. Renamed it back. Still not working. -.- WTF!
But thanks for the help. I will copy it again and leave untouched.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I stumbled upon a picture, where someone added a 3rd button next to all-army-select (the hotkey was something like s+w). I want to create a button, which doesn't select the whole army on the map, but close to it. Either only fighting units (excluding Observers), or only attacking/idle units (excluding units on patrol/hold position), or maybe only all units visible on the screen. It can be mapped to whatever, F2, F3 or some combination. Because players find the current functionality of the F2 key rather inconvenient.
Is this possible? Where would I start? Is this done with data editor, or triggers? Anyone tried it yet?
I managed to realize the army selection of units not on patrol and hold position. In case someone want's to recreate it, that's what I have done:
1) A Validator combining 2 Validators: Unit Order Queue. Both have Move in the Validator: Ability field, and in Validator: Ability Command one has the value 1 for patrol and the other 2 for hold position. Because in the Move-Ability there are hold, stop, patrol and a few others combined, they can be accessed through ability command.
2) A Behavior on each and every unit with the Validator from above in the Validator (Disable) field.
3) A trigger, which first adds all units into one unit group, iterates over this group and checks with UnitBehaviorCount() for this behavior, adds these into a second unit group and finally substracts the units in the second group from the first.
Looks easy now, but took some time to explore all these weird behaviors of the triggers and validators and abilities.....
Now I wanted to also make a button to select all army, which the user sees with his current screen position. I would need to know where he looks at. Is there such a Trigger? Because I can't find any...
I've seen this question asked before. Here's how I would make the third button. It has the UI layout + trigger work.
Link Removed: http://www.mediafire.com/file/zl74uz5vomj3ni4/Army_Button.SC2Map
This will one day cause my head to explode! ...
I copied the Trigger and the UI thingy (took me a while, since I haven't touched UI before), and it worked fine. Then I tried renaming it, so it's not called "new army button". Stopped working. Renamed it back. Still not working. -.- WTF!
But thanks for the help. I will copy it again and leave untouched.