Is there a way to have more than 2 weapon on 1 vehicle???

Ask questions, discuss ideas, get answers
Post Reply
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Is there a way to have more than 2 weapon on 1 vehicle???

Post by Dennis|8749236 »

Is there a way to have more than 2 weapon or function on 1 vehicle???
example: Fletcher Driver slot have Cannon (left mouse ), and depth charge, but depth charge is fired by pressing other keys..
and the fletcher driver still can use Artillery support function( right mouse )..
What is the meaning of Life?? (Don't think about it!)
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: Is there a way to have more than 2 weapon on 1 vehicle??

Post by Senshi »

Forgotten Hope uses the W/S keys to allow changing ammunitions in the Flak88 (AA or AP). This is the code you are looking for, as it are two different weapons that can be "switched". You can use any keys you want for this to work (e.g. the Up/Down keys for the ramp of the LCVP)

Alternatively, you can just use any input code you want and e.g. make "Down" drop the depth charges. Disadvantage? You can only have two ammo displays at the same time.

Code: Select all

rem *** Flak18/36GunSelector ***
ObjectTemplate.create RotationalBundle Flak18/36GunSelector
ObjectTemplate.setNetworkableInfo Flak18/36GunInfo
rem -------------------------------------
ObjectTemplate.addTemplate Flak18/36GunAP_Invis
ObjectTemplate.setRotation 0/-22.5/0
ObjectTemplate.addTemplate Flak18/36GunAA_Invis
ObjectTemplate.setRotation 0/22.5/179.999
rem -------------------------------------
ObjectTemplate.setMinRotation 0/0/-180
ObjectTemplate.setMaxRotation 0/0/0
ObjectTemplate.setMaxSpeed 0/0/900000
ObjectTemplate.setAcceleration 0/0/90000000
ObjectTemplate.setInputToRoll c_PIThrottle
It's just a rotational bundle that makes the gun switch between the AP_Invis and the AA_Invis. "InputtoRoll" is set to Throttle (W/S standard). You can use whatever you want.

In addition FH uses three more rot. bundles to make a visual 3D element of the HUD that shows which ammo is currently selected (basically a slider that moves between a scribbled "AA" and "AP" on the gun shield). Quite nifty way to do it, actually.
User avatar
Dennis|8749236
Posts: 239
Joined: Sun Nov 29, 2009 6:02 am
Location: Earth
Contact:

Re: Is there a way to have more than 2 weapon on 1 vehicle??

Post by Dennis|8749236 »

thanks alot... but i still don't get it how does it works... the two guns will still fire together, where did another projectile go?
What is the meaning of Life?? (Don't think about it!)
ERYL
Posts: 23
Joined: Tue Sep 18, 2012 12:55 am

Re: Is there a way to have more than 2 weapon on 1 vehicle??

Post by ERYL »

So it's possible to make a battlefield 2 style helicopter with a turret and tv guided missiles in the secondary position?
Back from the dead
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: Is there a way to have more than 2 weapon on 1 vehicle??

Post by Senshi »

Sure. Just look at the Wasserfall rocket code, slap that on to the helicopter's gunner position, work around all the bugs and glitches and enjoy your guided missile. However it's "direct control" like the Wasserfall, not the "click where you want missile to go" like in BF2. That is not supported by the engine.
ERYL
Posts: 23
Joined: Tue Sep 18, 2012 12:55 am

Re: Is there a way to have more than 2 weapon on 1 vehicle??

Post by ERYL »

Cool.

Can the battlefield 2 guidance method be replaced by the BF1942's one?
Back from the dead
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: Is there a way to have more than 2 weapon on 1 vehicle??

Post by Senshi »

Sure. Direct missile control is not that difficult to implement. Just convert the missile into a steerable PCO that you get to control. There are various examples in mods on how to do that (cruise missile stuff, BG42 V1 launcher etc.)
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Is there a way to have more than 2 weapon on 1 vehicle??

Post by Swaffy »

Senshi, you need a gold crown for your profile picture. ;)
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Diamondback
Posts: 590
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

Re: Is there a way to have more than 2 weapon on 1 vehicle??

Post by Diamondback »

Swaffy wrote:Senshi, you need a gold crown for your profile picture. ;)
He has none.
See my Strasbourg map project here.
Post Reply