Posted by: pablodalma - Tuesday, July 27, 2021 10:13:38 AM
As far as I seen, you can add primary, secondary and tertiary weapons to a vehicle. How about if you want to add another one? Can you modify some file somewhere so vehicles can have 4 weapons?

Posted by: UTD^Force - Friday, July 30, 2021 9:15:26 AM
Hello pablodalma, how are you doing? I recommend you take a look into the Avenger tank's code, as it kind of carries the anti-air turret. Another example would be the overlord tank's gattling cannon. Good luck.

Posted by: pablodalma - Friday, July 30, 2021 3:05:27 PM
I'm not sure if I'm looking the same version of the game but the Avengers have 2 weapons defined? And not 4? So far adding 3 weapons it's easy. But 4 I dont know if there is a workaround to do it since the reserved word "quaternary" doesnt seem to be defined

Posted by: AdrianeMapMaker - Friday, July 30, 2021 11:42:20 PM
avenger's turret is entirely a new different object ... its has its own mind and weaponset same as the gattling addon of the overlord

Posted by: UTD^Force - Saturday, July 31, 2021 1:16:42 PM
You won't always get the code online, but I got some time so here it is. This is the code from the avenger tank itself, the behaviour we are looking at is OverlordContain: [code=plain] . . . Behavior = OverlordContain ModuleTag_OverlordContain Slots = 1 DamagePercentToUnits = 100% AllowInsideKindOf = PORTABLE_STRUCTURE PassengersAllowedToFire = Yes PayloadTemplateName = AmericaTankAvengerLaserTurret ;name of object with new weapons or whatever ExperienceSinkForRider = Yes ; I get the Exp for things my turret friend kills End . . . [/code] You can find [color=red]Object AmericaTankAvengerLaserTurret[/color] in the same ini file just before the avenger's code. Good luck.

Posted by: pablodalma - Tuesday, August 3, 2021 9:34:57 AM
Ok, thanks. What you showed me helped me but indeed we are looking to different versions of the game, I found the Object Lazr_AmericaTankAvengerLaserTurret in other file, in the LaserGeneralMisc.ini file.

Posted by: beng - Saturday, November 6, 2021 6:06:55 AM
[quote=pablodalma;151151]As far as I seen, you can add primary, secondary and tertiary weapons to a vehicle. How about if you want to add another one? Can you modify some file somewhere so vehicles can have 4 weapons?[/quote] The normal 3 weapons are controlled by AIupdate modules. Yes you can add more than 3 weapons in several different ways: 1. Point defence laser weapons are automatically fired by the module independent of AIupdate - see paladin tank. You can use this to fire any weapon, but best those that don't use projectiles as the weapon will fire from the object origin on the ground and projectiles will tend to blow up immediately when fired. 2. Fireweapon update module will keep firing a weapon - see ECM tank 3. OCLspecial power can be used to fire any weapon via an OCL, see how the scud storm building does this. You can add command buttons to fire as many weapons as you have slots for in your commandset, and using the Worker switching technique, even more (up to 26 weapons per object potentially). 4. Fireweapon collide will fire a weapon when the object touches another object. Useful for objects that damage others by touching them. 5. You can fire weapons via death behaviours, FireWeaponWhenDead or SlowDeathBehaviour (it can fire 3 different weapons) for example. 6. Via overlord or helix contain to add another object with its own weapons as discussed in other replies.