Page 1 of 1
Dgun Command fire For Non TA games
Posted: 17 Jan 2010, 19:11
by bobthedinosaur
Can we make an alternative Dgun like command fire weapon work for non "Disintegrator" weapons, since many games do not have them?
Re: Dgun Command fire For Non TA games
Posted: 17 Jan 2010, 20:43
by zwzsg
Like the Byte's minelauncher or the Pointer's NX flag in KP, you mean?
Re: Dgun Command fire For Non TA games
Posted: 18 Jan 2010, 01:44
by SeanHeron
Thanks for the heads up Z! I'll admit I'm not familiar enough with KP to have thought of that otherwise. Good to know where I can grab stuff from - will probably rip code from the minelauncher (couldn't find the NX Flag's code at a glance).
However Bobs request was broader I think - ie have a tag to set weapons (other than the dgun) to not fire by default / fire only once for each specific attack order. I think this is still a valid request.
Re: Dgun Command fire For Non TA games
Posted: 18 Jan 2010, 08:18
by bobthedinosaur
I don't care about a new tag. it would just be nice to not reserve that feature for TA mods only. i'll take a look at your code Zwzsg, it will probably work for what i want.
Re: Dgun Command fire For Non TA games
Posted: 18 Jan 2010, 12:24
by FLOZi
used to be commandfire=1; and still is.
Re: Dgun Command fire For Non TA games
Posted: 18 Jan 2010, 15:22
by SeanHeron
Oh! Coolio

. Thanks for saving us a lot of trouble Flozi, and sorry for me and Bobs shallow knowledge of the topic..
Re: Dgun Command fire For Non TA games
Posted: 18 Jan 2010, 15:44
by FLOZi
Much worse, it's an OTA tag and bob should know better.

Re: Dgun Command fire For Non TA games
Posted: 18 Jan 2010, 17:07
by Pxtl
zwzsg wrote:Like the Byte's minelauncher or the Pointer's NX flag in KP, you mean?
I distinctly remember either you or KDR saying you couldn't get the d-gun behavior of "select D-gun, click target" and the weapon fires only under those conditions to work - all solutions either perma-locked the weapon or made the weapon fire like any other secondary weapon.
I take it this issue was resolved?
Re: Dgun Command fire For Non TA games
Posted: 18 Jan 2010, 17:36
by bobthedinosaur
commandfire=1; doesnt do crap. I was asking for a specific weapon button. If I tell a unit to attack any small thing it will waste a "dgun" like attack on the unit unless it has a dgun button/ hotkey designator.
i'll probably just look at KDR's code and see if that works. so dont worry about it. i was just pointing out another coddling for TA
edit: proper credits
Re: Dgun Command fire For Non TA games
Posted: 18 Jan 2010, 20:03
by zwzsg
bobthedinosaur wrote:i'll probably just look at Z's code
KDR's code. Afaik, it was a custom command with a custom button. See \LuaRules\Gadgets\specialattack.lua
Re: Dgun Command fire For Non TA games
Posted: 18 Jan 2010, 20:05
by Pxtl
zwzsg wrote:bobthedinosaur wrote:i'll probably just look at Z's code
KDR's code. Afaik, it was a custom command with a custom button. See \LuaRules\Gadgets\specialattack.lua
So in other words, the actual, literal "D-Gun" command that has a default keybind associated with it is still pretty much only useful for TA, and nobody can make use of it in non-TA mods.
Re: Dgun Command fire For Non TA games
Posted: 18 Jan 2010, 20:49
by FLOZi
bobthedinosaur wrote:commandfire=1; doesnt do crap. I was asking for a specific weapon button. If I tell a unit to attack any small thing it will waste a "dgun" like attack on the unit unless it has a dgun button/ hotkey designator.
i'll probably just look at Z's code and see if that works. so dont worry about it. i was just pointing out another coddling for TA
Ah, now i see.
Having a quick grep through the code suggests canDGun for the unitdef. It's not immediately clear if that is tied to only work with DISINTEGRATOR type weapons, though (Doesn't seem to be at a glance). In any case if you want multiple dgun-type weapons then yeah, lua is the only way to go currently.

Re: Dgun Command fire For Non TA games
Posted: 18 Jan 2010, 21:44
by SeanHeron
Well - no worries. I thought it sounded too good to be true

. I shouldn't have been lazy and actually tried what you were saying before replying... guess we're sorted for the moment.
The request as such is still valid though!
Re: Dgun Command fire For Non TA games
Posted: 19 Jan 2010, 10:27
by imbaczek
KP's NX pointer attack still seems to be pretty much what you want. Can't point you to a specific file but you can grep gadgets for "pointer".
Re: Dgun Command fire For Non TA games
Posted: 21 Jan 2010, 21:27
by zwzsg
imbaczek wrote:KP's NX pointer attack still seems to be pretty much what you want. Can't point you to a specific file but you can grep gadgets for "pointer".
zwzsg wrote:See \LuaRules\Gadgets\specialattack.lua
Re: Dgun Command fire For Non TA games
Posted: 26 Jan 2010, 12:48
by KDR_11k
I believe any commandfire weapons on a canDGun unit will be bound to the dgun button, IIRC I had that mixed on a SimBase EDIT commander that had both a regular weapon and a vlaunch missile.