The 3rd Age

Gauntlet: Dark Legacy

Gauntlet: Dark Legacy

Gauntlet: Dark Legacy BFME 2 Mod

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!

   

Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

Tank turrets in BFME 2

Avatar of Hostile

Hostile

Category: Code
Level: Intermediate
Created: Thursday March 29, 2007 - 9:17
Updated: Sunday July 29, 2007 - 4:53
Views: 6838
Summary: Explaining how to make tank (and other) turrets in BFME

Rating

Staff says

3.0

Members say

5.0

Average

3.4/5.0

5 votes

Maybe it's a dream come true, but it comes a few years too late. Perhaps it's a sign of things to come for CNC3. What I do know is we not only have access to 3 turrets per vehicle, we can now set firing arcs for these turrets.

This was a great improvment for the BSG mod. But never the less, here it is. Found in the cinimatic object folder named "tank" This portion of code set up the turrets as weapons. Notice you have to place new public bones for the turrets, these bones should be the name of the mesh that makes up the seperate turret object.

This tankdraw module tells the unit that this unit will have turrets. It also sets up the tread FX.

              
Code
;    Draw = W3DTankDraw ModuleTag_01
;        OkToChangeModelColor    = Yes
;        ExtraPublicBone         = Turret01
;        
;        DefaultModelConditionState
;            Model             = NVBtMstr
;            Turret             = Turret01
;            
;;; Use these to set up secondary and tertiary turrets;;;
;            SecondaryTurret        = Turret02
;            TertiaryTurret        = Turret03
;;; --------------------------------------------------;;;


Here is where the new magic begins, you can restrict the firing arc and the starting turret angle. Why is this important you ask? Because you can now make a WWI tank that has a machine gun turret on each side and limited to only firing to each side within a limited firing arc.

Or you could have a bunker that limits it's firing arc. Or perhaps a spaceship where the turrets are mounted on the sides and should not be able to fire through itself. Many uses for this gift from EA.

              
Code
;    Behavior = AIUpdateInterface ModuleTag_03
;        AutoAcquireEnemiesWhenIdle = Yes
;        Turret
;            TurretTurnRate = 180; turn rate, in degrees per sec
;            TurretPitchRate = 30; does not pitch
;            ControlledWeaponSlots = PRIMARY
;            
;;;; Use these to restrict the firing arc of the turret;;;
;;            NaturalTurretAngle = 0; Natural angle of the turret relative to the front of the object
;;            TurretMaxDeflectionCW = 90; Maximum deflection of the turrect clockwise from the natural turret angle
;;            TurretMaxDeflectionACW = 90; Maximum deflection of the turrect anti-clockwise from the natural turret angle
;;;; --------------------------------------------------;;;
;            
;        End
;                
;;;; Use these to set up secondary and tertiary turrets;;;
;;        SecondaryTurret
;            TurretTurnRate = 180; turn rate, in degrees per sec
;            TurretPitchRate = 30; does not pitch
;            ControlledWeaponSlots = SECONDARY            
;        End
;
;        TertiaryTurret
;            TurretTurnRate = 180; turn rate, in degrees per sec
;            TurretPitchRate = 30; does not pitch
;            ControlledWeaponSlots = TERTIARY
;        End
;;; --------------------------------------------------;;;


How this can be used for BFME2? Only you can tell me... (can you say, mounted archers that fire while moving and not shoooting behind themselves ;) )

Comments

Display order: Newest first

ambershee - Monday August 27, 2007 - 22:12

I have a solution that works in all three games, that allows you to have any number of different turrets you so desire. Perhaps I should write a tutorial at some point, when I've finished my mod =]

jimiojoe - Thursday April 19, 2007 - 15:47

waheeyy awesome find that is

for the rohirrim thing, i tried ages ago and it sort of worked but my modelling skills were too poor, you can just use a horde contain and assign the rider to a bone of the horse. They can fire if moving or not. But you would have to make a model of the horse with that bone and then the rider and make the code for the riding position animation...

just a random thought...

Ohh - i remember before bfme2 came out they said that for the ships they would have something where if you turn the ship around you would have to wait for a couple of seconds for what would be the crew inside running to the other end of the ship - is this how they did it you think? I don't know why they scrapped that idea its more realistic...

Hostile (Administrator) - Thursday April 12, 2007 - 21:05

This is not true. I used it to create three turrets on the Battlestar Galactica mod. All turrets fired correctly and independantly. The only thing I haven't fully tested on all three turrets was the firing arc restrictions and starting arc angles.

Lord Of Gifts - Saturday March 31, 2007 - 17:47

It should be mentioned that the Secondary and Tertiary turrets don't actually work. Still only one turret per object. :(

Solinx (Team Chamber Member) - Friday March 30, 2007 - 6:15

Never tried it, but it does look that way.

watsupcuz - Friday March 30, 2007 - 2:14

So what this does will allow just say, the rohirrim archers to move and shoot like in the movies. If it does you may want to give nazgul a pm and tell him.

Go to top

 

"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."

 
9:37:22