Units non-selectable
by Edward Pollard · in RTS Starter Kit · 11/25/2004 (4:52 pm) · 4 replies
Some quick playing with the RTS Example got my units in (replacing the Bot) really quick. Nice.
But with *my* unit, I can't select the unit. I can drag a box over a unit to select it, but I can't just select it with a click.
I'm sure the answer is simple which is why I ask it here: why?
But with *my* unit, I can't select the unit. I can drag a box over a unit to select it, but I can't just select it with a click.
I'm sure the answer is simple which is why I ask it here: why?
#2
11/26/2004 (3:08 am)
I have the same problem with the stock building. Some times I have to click on it several times before it gets selected. Haven't figured that one out yet either.
#3
case "None":
if(%this.getSelectionSize())
%this.selectBuilding(%building);
For some reason, if you have no $CommandMenu::CurrentCommand set, the code seems to think you shouldn't be able to start a new selection.
Comment out the second line above and it should allow you to select buildings with any selection count.
11/26/2004 (6:28 am)
@Jeff: Your problem (however, not Edward's), is almost certainly due to a line in inputHandler.cs: around 102, in function GuiRTSTSCtrl::onMouseDownBuilding:case "None":
if(%this.getSelectionSize())
%this.selectBuilding(%building);
For some reason, if you have no $CommandMenu::CurrentCommand set, the code seems to think you shouldn't be able to start a new selection.
Comment out the second line above and it should allow you to select buildings with any selection count.
#4
Edward, Martin's suggestion is just about the only thing I can think of too. That is, as long as your units are RTSUnits.
11/26/2004 (10:31 pm)
Thanks Stephen.Edward, Martin's suggestion is just about the only thing I can think of too. That is, as long as your units are RTSUnits.
Torque 3D Owner Martin "Founder" Hoover