[TREPAN] Commandfire=1 is broken in luadefs
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
[TREPAN] Commandfire=1 is broken in luadefs
I tried it using every way I could think of for a true value, and no dice.
1,
"1",
true,
"true", << WHich being a boolean should be correct, even tho I have seen booleans accept 1, and true, as possible values.
Fix Plox?
I'mma stick the weapon as a TDF for the moment, but I would really like to be able to use the actual luadef for it.
1,
"1",
true,
"true", << WHich being a boolean should be correct, even tho I have seen booleans accept 1, and true, as possible values.
Fix Plox?
I'mma stick the weapon as a TDF for the moment, but I would really like to be able to use the actual luadef for it.
Re: [TREPAN] Commandfire=1 is broken in luadefs
Why are you calling for Trepan? It has been broken long before Trepan was a team member. Commandfire only makes the weapon cancel its attack order after shooting once, it doesn't prevent autotargetting.
Re: [TREPAN] Commandfire=1 is broken in luadefs
Forb said repeatedly it worked in the tdf. 

Re: [TREPAN] Commandfire=1 is broken in luadefs
Looks like it's working for CA. The fact that it works for
TDFs means that it's at least possible to have it work
through the lua defs (as TDFs are actually parsed by lua).
Try something like this to check your state:
/luaui run for k,v in pairs(WeaponDefNames) do print(k,v.manualFire) end
(the DoLine widget needs to be enabled).
P.S. "manualFire" is the both the internal variable name
and the lua interface name for "commandFire".
TDFs means that it's at least possible to have it work
through the lua defs (as TDFs are actually parsed by lua).
Try something like this to check your state:
/luaui run for k,v in pairs(WeaponDefNames) do print(k,v.manualFire) end
(the DoLine widget needs to be enabled).
P.S. "manualFire" is the both the internal variable name
and the lua interface name for "commandFire".
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [TREPAN] Commandfire=1 is broken in luadefs
Hmmm, ok I will test it.
Funky... BTW KDR, Commandfire 1 means that you must physically target something with the attack button for it to shoot.
The reason that this is a big deal to me is because that the orbital laser in evolution keeps wanting to pop off...
Come to think of it... When the orbital laser was on a different unit, it never blew it's load prematurely. Am I missing something here?
Funky... BTW KDR, Commandfire 1 means that you must physically target something with the attack button for it to shoot.
The reason that this is a big deal to me is because that the orbital laser in evolution keeps wanting to pop off...
Come to think of it... When the orbital laser was on a different unit, it never blew it's load prematurely. Am I missing something here?
Re: [TREPAN] Commandfire=1 is broken in luadefs
I had commandfire=1 on the Titan in CvC, it would still shoot stuff by itself IIRC.
Re: [TREPAN] Commandfire=1 is broken in luadefs
Is there any way for lua to access the clipboard?
Re: [TREPAN] Commandfire=1 is broken in luadefs
From uikeys.txt:
// bind Ctrl+v pastetext
(not exactly lua access, but you can
paste commands for /luaui using it)
// bind Ctrl+v pastetext
(not exactly lua access, but you can
paste commands for /luaui using it)
Re: [TREPAN] Commandfire=1 is broken in luadefs
Hmm. The fact *A commanders don't DGun everything on sight should mean commandfire is working like it should. I've done a weapon with that, and it works like it should - it only fires if manually ordered to.KDR_11k wrote:I had commandfire=1 on the Titan in CvC, it would still shoot stuff by itself IIRC.
Are you sure you put the tag into weapon definition and not the unit definition? It only works in weapon files...
Re: [TREPAN] Commandfire=1 is broken in luadefs
There may be different autotargeting logic depending on whether or not CanDgun is true.yuritch wrote:Hmm. The fact *A commanders don't DGun everything on sight should mean commandfire is working like it should. I've done a weapon with that, and it works like it should - it only fires if manually ordered to.KDR_11k wrote:I had commandfire=1 on the Titan in CvC, it would still shoot stuff by itself IIRC.
Are you sure you put the tag into weapon definition and not the unit definition? It only works in weapon files...
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [TREPAN] Commandfire=1 is broken in luadefs
yuritch wrote:Hmm. The fact *A commanders don't DGun everything on sight should mean commandfire is working like it should. I've done a weapon with that, and it works like it should - it only fires if manually ordered to.KDR_11k wrote:I had commandfire=1 on the Titan in CvC, it would still shoot stuff by itself IIRC.
Are you sure you put the tag into weapon definition and not the unit definition? It only works in weapon files...
Luadefs...
Luadefs...
Luadefs...
Not FBI/tdf
Re: [TREPAN] Commandfire=1 is broken in luadefs
You still haven't posted the def in question.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [TREPAN] Commandfire=1 is broken in luadefs
Edit: I didn't think there was much point...KDR_11k wrote:You still haven't posted the def in question.
Luadef that doesn't work...
Code: Select all
local weaponDefs = {
deathray = {
areaOfEffect = 500,
avoidFeature = false,
avoidFriendly = false,
beamWeapon = true,
cegTag = "electricbolt",
collideFeature = false,
collideFriendly = false,
commandfire = true,
coreThickness = 3,
duration = 0.5,
energypershot = 250000,
explosionGenerator = "custom:NUKE",
fallOffRate = 0.1,
fireStarter = 90,
guidance = true,
id = 666,
impluse = "1",
interceptedByShieldType = 1,
largeBeamLaser = true,
lineOfSight = true,
metalpershot = 0,
name = "Doom Laser",
range = 200000,
reloadtime = 180,
renderType = 0,
rgbColor = "1 0.5 0",
rgbColor2 = "0 0 1",
soundHit = "18402_inferno_xplo.wav",
soundStart = "doomlaser2.wav",
startVelocity = 5000,
sweep = "1",
sweepfire = true,
targetMoveError = 0,
texture1 = "megaparticle",
texture2 = "empty",
texture3 = "empty",
texture4 = "empty",
thickness = 120,
tolerance = 50000,
turret = true,
weaponVelocity = 5000,
damage = {
default = 25000,
},
},
}
unitDef.weaponDefs = weaponDefs
Last edited by Forboding Angel on 24 May 2008, 10:56, edited 2 times in total.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [TREPAN] Commandfire=1 is broken in luadefs
However if you stick this in the luadef for the unit it does work.
noAutoFire = true,
Since when did that responsibility get transferred from the weapon to the unit?
Also, I think commander = 1, is the culprit for why commandfire is being broken.
Might be worth looking into.
noAutoFire = true,
Since when did that responsibility get transferred from the weapon to the unit?
Also, I think commander = 1, is the culprit for why commandfire is being broken.
Might be worth looking into.
Re: [TREPAN] Commandfire=1 is broken in luadefs
IIRC that's what I had to do for the CvC titan too, regular weapons that are neither dgun nor stockpile don't seem to care much for commandfire.