How do I get a unit to be able to fire more than one weapon such as a ship being able to fire both missiles and a railgun?
When I use: weapons = {
[1]={name = "coaxialrailgun1" and "cmissile",
},
},
} It causes a randomly causes either the railgun or the missile to be the only one that fires.
When I use: weapons = {
[1]={name = "coaxialrailgun1", "cmissile",
},
},
} The one listed first is the only one that fires.
When I use: weapons = {
[1]={name = "coaxialrailgun1",
[2]={name = "cmissile",
},
},
}
It becomes a invalid unit def.
Units firing multiple weapons
Moderator: Moderators
- KingRaptor
- Zero-K Developer
- Posts: 838
- Joined: 14 Mar 2007, 03:44
Re: Units firing multiple weapons
Code: Select all
weapons = {
[1]={name = "coaxialrailgun1"},
[2]={name = "cmissile"},
},
Re: Units firing multiple weapons
If you use a proper source code editor, that knows text highlighting for Lua, it will indent your code in a way, that you see that kind of mistakes quicker. It will also highlight the closing/opening bracket that corresponds to the one where your cursor currently is. Really helpful!
-
- Posts: 7
- Joined: 21 Jul 2013, 22:17
Re: Units firing multiple weapons
Thanks, assault corvettes now have missiles and the heavy cruiser and mothership now have a secondary railgun battery.