I want to have a button visible on the screen, similar to the select army button (F2). When a player clicks it, all units of a specifik kind are selected. For example, Terran has a button that when clicked selects all Marines in the game, controlled by that player.
I have two ideas that may work in theory but I have no idea how to build it in the editor.
1) Add a button on the screen similar to the select army button (F2)...
2) Hide a dummy unit somewhere on the map that has a hero icon on the screen (F5 or something).. When a player selects it, it searches for all Marines on the entire map and selects them all. The dummy hero also needs to unselect itself when it selects all Marines.
Any ideas how to build this in the editor? Or do you have any other ideas?
The Modify Unit effect can be used to select target units. Still it is probably best to use Dialog triggers to add a button that then uses triggers to select all the units.
Else you are going to have to make an Ability UI layout frame linked to the main game UI and link it to an ability that uses a global Search Area effect that has a Modify Unit effect validated by a Unit Type validator.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
what do you think about having a dummy hero with a hero icon on the screen, which uses an ability that uses a global Search Area effect that has a Modify Unit effect validated by a Unit Type validator? (as you suggested)
This would solve the issue of having an icon on the screen + only require the data editor for the selection ability?
Hmm.. One consequence could be that a player first needs to select the dummy hero and then click the ability, hence two clicks... It would be smoother if it only required one click on the icon to select all units..