i created two new buildings for my map and i forgot how i can make it that these buildings aren't selectable if any one select units with that left mouse click rectangle. Some time ago i made this for other buildings. If I remember correctly i made it with aliases but it does not work if i try this again.
I set these unit aliases to the same (as with the other buildings):
"Unit - Select Alias" ,
"Unit - Subgroup Alias" .
Furthermore i tried to set the "Unit - Leader Alias" to the same too.
I don't think it is a unit flag problem because i copied the flags from a working building to test that. But nothing works.
Do you know what is wrong?
Would not surprise me if it has nothing to do with aliases because Blizzards standard buildings haven't all the same aliases but currently i can't find another difference between my old working buildings and the new ones.
For preventing all forms of selection there's the Unselectable flag on the unit. I don't know if you can somehow prevent only box-select, especially if the box contains just that one unit, but the opposite can probably be done using actors/models: Messing with the "radius" of the model or disabling "Add To Proximity System" on the actor should prevent left-click selection while allowing the box. Technically left-click selection is still "allowed" in that case, you simply give the game engine 0 on-screen area that will trigger it.
The various Aliases are for making multiple unit types equal to each other, as explained when you mouse over the fields there's one for double-click/Ctrl-click select and one for grouping once selection has occurred, plus the Tech and Leaderboard ones. I think the Unit-over-Structure box priority is hardcoded and tied to those tags.
There is of course also the (probably hardcoded) distinction between "units" and "structures". I don't know which of the fields actually controls it, but if any "unit" is in the rectangle it is prioritised over an arbitrarily high number of "structures" in the same area. This is however dependent on "units" being present, and will never result in an empty selection.
If you have a working instance in the same map, select that and the structure you're working on simultaneously, which will show only the fields that differ between the two (or at least there's one option to do that). Check both the Unit and the Actor, and expand the "+" array fields as much as possible via the viewer options at the top of the data module.
There is Model Allow Hit Test flag in unit actor and also message in
events. Making anything unselectable.
That unfortunately isn't working because i can't select the building in your both solutions. Not with left click and not with box select.
But it is possible to allow left click select and box select only if the building is the only unit in the box. As with the standard buildings. I only forgot the right way..
If you have a working instance in the same map, select that and the
structure you're working on simultaneously, which will show only the
fields that differ between the two (or at least there's one option to do
that). Check both the Unit and the Actor, and expand the "+" array
fields as much as possible via the viewer options at the top of the data
module.
Yes ok, I will compare all again in more detail. If I have found a solution I will it explain here.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Good morning,
i created two new buildings for my map and i forgot how i can make it that these buildings aren't selectable if any one select units with that left mouse click rectangle. Some time ago i made this for other buildings. If I remember correctly i made it with aliases but it does not work if i try this again.
I set these unit aliases to the same (as with the other buildings):
"Unit - Select Alias" ,
"Unit - Subgroup Alias" .
Furthermore i tried to set the "Unit - Leader Alias" to the same too.
I don't think it is a unit flag problem because i copied the flags from a working building to test that. But nothing works.
Do you know what is wrong?
Would not surprise me if it has nothing to do with aliases because Blizzards standard buildings haven't all the same aliases but currently i can't find another difference between my old working buildings and the new ones.
For preventing all forms of selection there's the Unselectable flag on the unit. I don't know if you can somehow prevent only box-select, especially if the box contains just that one unit, but the opposite can probably be done using actors/models: Messing with the "radius" of the model or disabling "Add To Proximity System" on the actor should prevent left-click selection while allowing the box. Technically left-click selection is still "allowed" in that case, you simply give the game engine 0 on-screen area that will trigger it.
The various Aliases are for making multiple unit types equal to each other, as explained when you mouse over the fields there's one for double-click/Ctrl-click select and one for grouping once selection has occurred, plus the Tech and Leaderboard ones. I think the Unit-over-Structure box priority is hardcoded and tied to those tags.
There is Model Allow Hit Test flag in unit actor and also message in events. Making anything unselectable.
I don't think it is a unit flag problem because i copied the flags from a working building to test that. But nothing works.
aliiii
There is of course also the (probably hardcoded) distinction between "units" and "structures". I don't know which of the fields actually controls it, but if any "unit" is in the rectangle it is prioritised over an arbitrarily high number of "structures" in the same area. This is however dependent on "units" being present, and will never result in an empty selection.
If you have a working instance in the same map, select that and the structure you're working on simultaneously, which will show only the fields that differ between the two (or at least there's one option to do that). Check both the Unit and the Actor, and expand the "+" array fields as much as possible via the viewer options at the top of the data module.
Sorry for my late answer.
That unfortunately isn't working because i can't select the building in your both solutions. Not with left click and not with box select.
But it is possible to allow left click select and box select only if the building is the only unit in the box. As with the standard buildings. I only forgot the right way..
What's wrong with that? Grammatic?
Yes ok, I will compare all again in more detail. If I have found a solution I will it explain here.