Thanks a lot! That defo does help but the main problem before this one is that I don't understand how to get this type of command button to work or even make on.
I know how to make CONSTRUCT types, I can copy and paste weapon ones and edit the name, simple. But I don't understand these, the one that I tried looking at first was this
CommandButton Command_GLAToxinTractorContaminateGround
Command = FIRE_WEAPON
WeaponSlot = SECONDARY ; Best if this matches up with an AutoChoose listing that forbids this slot normally
Options = NEED_TARGET_POS OK_FOR_MULTI_SELECT
TextLabel = CONTROLBAR:Contaminate
ButtonImage = SSContaminate
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipGLAFireToxinTractorSlime
UnitSpecificSound = ToxinTractorVoiceModeContam
End
So I can't see where the actual weapon is that it will fire? It doesn't mention it at all.
Then I tried looking at the battleship as it is similar to what I want but again I can't see where it shows me the weapon. What is the main thing that I am missing here? I'm sure it will be easy to understand once I find it. (Like OCL, I didn't get it all but now I'm getting the hang of it a bit, managing to copy one and edit it).
CommandButton Command_BattleshipFire
Command = FIRE_WEAPON
WeaponSlot = PRIMARY
Options = OK_FOR_MULTI_SELECT NEED_TARGET_POS CONTEXTMODE_COMMAND
TextLabel = CONTROLBAR:BattleshipFire
ButtonImage = SSBarrage
CursorName = Target
InvalidCursorName = GenericInvalid
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipFireBattleship
End
P.S.
Thanks for the first tip as well.
WeaponSet
Weapon = PRIMARY artyweapon
PreferredAgainst = PRIMARY NONE ;this is important, so that it doesn't use it at all.
AutoChooseSources = PRIMARY NONE ;this too, so not even force-firing tells it to use the weapon.
End
I didn't know you could deny force fire, I just simply edited the engineering to stop it from firing. Yes to No, would still do the same thing as 'PreferredAgainst'?
AutoAcquireEnemiesWhenIdle = Yes ;ATTACK_BUILDINGS; defensive weapon
Edited by user Tuesday, September 26, 2017 3:37:22 PM(UTC)
| Reason: Not specified