Quote:
Originally Posted by beng
You are right the command button is wrong: DOZER_CONSTRUCT is the wrong command for building units. Compare with other command buttons and you will see.
|
I checked the Command Button file and found that all of the command buttons for buildings have Command = Dozer_Construct associated with them:
Code:
CommandButton Command_ConstructAmericaCommandCenter
Command = DOZER_CONSTRUCT
Object = AmericaCommandCenter
TextLabel = CONTROLBAR:ConstructAmericaCommandCenter
ButtonImage = SAComCentr
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildCommandCenter
End
CommandButton Command_ConstructAmericaPowerPlant
Command = DOZER_CONSTRUCT
Object = AmericaPowerPlant
TextLabel = CONTROLBAR:ConstructAmericaPowerPlant
ButtonImage = SAPowerPlant
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildPowerPlant
End
CommandButton Command_ConstructAmericaBarracks
Command = DOZER_CONSTRUCT
Object = AmericaBarracks
TextLabel = CONTROLBAR:ConstructAmericaBarracks
ButtonImage = SABarracks
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildBarracks
End
CommandButton Command_ConstructAmericaSupplyCenter
Command = DOZER_CONSTRUCT
Object = AmericaSupplyCenter
TextLabel = CONTROLBAR:ConstructAmericaSupplyCenter
ButtonImage = SASupplyCntr
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildSupplyCenter
End
CommandButton Command_ConstructAmericaWall
Command = DOZER_CONSTRUCT
Object = AmericaWall
TextLabel = CONTROLBAR:ConstructAmericaWall
ButtonImage = SAFence
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildSecurityFence
End
CommandButton Command_ConstructAmericaWarFactory
Command = DOZER_CONSTRUCT
Object = AmericaWarFactory
TextLabel = CONTROLBAR:ConstructAmericaWarFactory
ButtonImage = SACWeaponsfact
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildWarFactory
End
CommandButton Command_ConstructAmericaPatriotBattery
Command = DOZER_CONSTRUCT
Object = AmericaPatriotBattery
TextLabel = CONTROLBAR:ConstructAmericaPatriotBattery
ButtonImage = SAPatriot
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildPatriotBattery
End
CommandButton Command_ConstructAmericaFireBase
Command = DOZER_CONSTRUCT
Object = AmericaFireBase
TextLabel = CONTROLBAR:ConstructAmericaFireBase
ButtonImage = SAFirebase
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildFireBase
End
CommandButton Command_ConstructAmericaAirfield
Command = DOZER_CONSTRUCT
Object = AmericaAirfield
TextLabel = CONTROLBAR:ConstructAmericaAirfield
ButtonImage = SAACommand
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildAirField
End
CommandButton Command_ConstructAmericaParticleCannonUplink
Command = DOZER_CONSTRUCT
Object = AmericaParticleCannonUplink
TextLabel = CONTROLBAR:ConstructAmericaParticleCannonUplink
ButtonImage = SAUplink
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildParticleCannon
End
CommandButton Command_ConstructAmericaStrategyCenter
Command = DOZER_CONSTRUCT
Object = AmericaStrategyCenter
TextLabel = CONTROLBAR:ConstructAmericaStrategyCenter
ButtonImage = SAStrategyCenter
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildStrategyCenter
End
CommandButton Command_ConstructAmericaSupplyDropZone
Command = DOZER_CONSTRUCT
Object = AmericaSupplyDropZone
TextLabel = CONTROLBAR:ConstructAmericaSupplyDropZone
ButtonImage = SADropZone
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildSupplyDropZone
End
CommandButton Command_ConstructAmericaDetentionCamp
Command = DOZER_CONSTRUCT
Object = AmericaDetentionCamp
TextLabel = CONTROLBAR:ConstructAmericaDetentionCamp
ButtonImage = SAPrison
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildDetentionCamp
End
CommandButton Command_ConstructGLACommandCenter
Command = DOZER_CONSTRUCT
Object = GLACommandCenter
TextLabel = CONTROLBAR:ConstructGLACommandCenter
ButtonImage = SUHeadquarters
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipGLABuildCommandCenter
End
CommandButton Command_ConstructFakeGLACommandCenter
Command = DOZER_CONSTRUCT
Object = FakeGLACommandCenter
TextLabel = CONTROLBAR:ConstructFakeGLACommandCenter
ButtonImage = SUHeadquarters_F
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipFakeGLABuilding
End
CommandButton Command_ConstructGLADemoTrap
Command = DOZER_CONSTRUCT
Object = GLADemoTrap
TextLabel = CONTROLBAR:ConstructGLADemoTrap
ButtonImage = SSHideBomb
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipGLABuildDemoTrap
End
CommandButton Command_ConstructGLABarracks
Command = DOZER_CONSTRUCT
Object = GLABarracks
TextLabel = CONTROLBAR:ConstructGLABarracks
ButtonImage = SUBarracks
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipGLABuildBarracks
End
CommandButton Command_ConstructFakeGLABarracks
Command = DOZER_CONSTRUCT
Object = FakeGLABarracks
TextLabel = CONTROLBAR:ConstructFakeGLABarracks
ButtonImage = SUBarracks_F
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipFakeGLABuilding
End
CommandButton Command_ConstructGLASupplyStash
Command = DOZER_CONSTRUCT
Object = GLASupplyStash
TextLabel = CONTROLBAR:ConstructGLASupplyStash
ButtonImage = SUSupplyCenter
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipGLABuildSupplyStash
End
CommandButton Command_ConstructFakeGLASupplyStash
Command = DOZER_CONSTRUCT
Object = FakeGLASupplyStash
TextLabel = CONTROLBAR:ConstructFakeGLASupplyStash
ButtonImage = SUSpplyCtr_F
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipFakeGLABuilding
End
CommandButton Command_ConstructGLAArmsDealer
Command = DOZER_CONSTRUCT
Object = GLAArmsDealer
TextLabel = CONTROLBAR:ConstructGLAArmsDealer
ButtonImage = SUArmsDealer
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipGLABuildArmsDealer
End
CommandButton Command_ConstructFakeGLAArmsDealer
Command = DOZER_CONSTRUCT
Object = FakeGLAArmsDealer
TextLabel = CONTROLBAR:ConstructFakeGLAArmsDealer
ButtonImage = SUArmsDealer_F
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipFakeGLABuilding
End
CommandButton Command_ConstructChinaCommandCenter
Command = DOZER_CONSTRUCT
Object = ChinaCommandCenter
TextLabel = CONTROLBAR:ConstructChinaCommandCenter
ButtonImage = SNComCentr
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipChinaBuildCommandCenter
End
CommandButton Command_ConstructChinaInternetCenter
Command = DOZER_CONSTRUCT
Object = ChinaInternetCenter
TextLabel = CONTROLBAR:ConstructChinaInternetCenter
ButtonImage = SNIntCnt
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipChinaBuildInternetCenter
End
CommandButton Command_ConstructChinaPowerPlant
Command = DOZER_CONSTRUCT
Object = ChinaPowerPlant
TextLabel = CONTROLBAR:ConstructChinaPowerPlant
ButtonImage = SNReactor
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipChinaBuildPowerPlant
End
CommandButton Command_ConstructChinaBarracks
Command = DOZER_CONSTRUCT
Object = ChinaBarracks
TextLabel = CONTROLBAR:ConstructChinaBarracks
ButtonImage = SNBarracks
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipChinaBuildBarracks
End
CommandButton Command_ConstructChinaSupplyCenter
Command = DOZER_CONSTRUCT
Object = ChinaSupplyCenter
TextLabel = CONTROLBAR:ConstructChinaSupplyCenter
ButtonImage = SNSupplyCenter_L
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipChinaBuildSupplyCenter
End
...
I discovered my mistake: Dozer_Construct only works with buttons for buildings. I should have used Unit_Build with my dozer. lol
Code:
CommandButton Command_ConstructDeltaDozer
Command = UNIT_BUILD
Object = DeltaVehicleDozer
TextLabel = CONTROLBAR:ConstructDeltaDozer
ButtonImage = SACDozer
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipDeltaBuildDozer
End
I feel silly for not checking this out sooner. Duh for me! X_X
The next time I create new units, I have to make sure I am cloning the right blocks of code.