SetGearUp Property

Usage:
   ObjectTemplate.SetGearUp number

Argument values:

argument 1:    range is 0.7 to 0.95; most commonly 0.7, 0.95

Description: This property sets how the engine speed affects gearing and automatic up-shifting. It is set for land vehicles and planes in Physics.con. For example, 0.5 means your car gear goes up to the next gear when half engine speed or greater is reached.

Values used in BF: 0.7 for planes, 0.85 for the Katyusha truck, 0.95 for other land vehicles.

When the engine gets to a certain speed, and the terrain will permit the engine to pull the vehicle in the next gear, an up-shift occurs. It is not noticeable by sound, and takes about 1 frame to occur. However, you can increase the time which it takes a change to occur with SetGearChangeTime. During this time (if it is long enough) there is no power transmission to the wheels, which means a long gear change on a steep slope means you will slip back a bit and probably not be able to gain traction again.

Once you have reached the highest gear specified for the vehicle you are in (BF supports up to and including 5 gears with SetNumberOfGears), the engine will pull you along as fast as it can until your engine speed starts to die, in which case, if engine speed is below a certain value (maybe 50% power) a gear shift will occur, taking the drive off for a frame (gear changes are about 0.05 seconds with SetGearChangeTime) after which you will have control, torque and drive again. This process continues indefinitely without any input from the user. (Console.ShowStats 1 will enable you to see your current gear).

The game engine knows what the next most efficient gear from your current speed will be, which is why if you are bombing down a hill in 3, it may jump all the way to 5.

The reason gears are used is to balance engine power out over terrain, but also to prevent the engine being able to haul you up anything as long as it is powerful enough and you retain traction.

Basically gears just balance out the engine drive, power to weight to elevation to speed required ratios and pulls the vehicle up one slope and down the next, changing the speed as little as possible (although considerable speed change does occur).

Related properties: SetGearDown, SetGearChangeTime, SetNumberOfGears, SetTorque, SetDifferential, SetEngineType, SetNoPropellerEffectAtSpeed

Used in object types (and how often in each type): Engine (46%)

Used in a total of 55 .con files: Physics.con

Parent directories of these .con files: objects/Vehicles, Bf1942/Levels

Example: (from objects/Vehicles/Land/Willy/Physics.con)
   rem *** WillyEngine ***
   ObjectTemplate.Create Engine WillyEngine
   ObjectTemplate.SetNetworkableInfo WillyEngineInfo
   ObjectTemplate.SetAttachToListener 1
   ObjectTemplate.LoadSoundScript Sounds/WillyEngine.ssc
   ObjectTemplate.HasMobilePhysics 1
   ObjectTemplate.HasCollisionPhysics 1
   ObjectTemplate.HasResponsePhysics 1
   rem -------------------------------------
   ObjectTemplate.AddTemplate WillyFrontWheelR
   ObjectTemplate.SetPosition 0.6/0.11/1.0
   ObjectTemplate.AddTemplate WillyFrontWheelL
   ObjectTemplate.SetPosition -0.6/0.11/1.0
   ObjectTemplate.AddTemplate WillyBackSpringR
   ObjectTemplate.SetPosition 0.6/-0.472/-1.21
   ObjectTemplate.AddTemplate WillyBackSpringL
   ObjectTemplate.SetPosition -0.6/-0.472/-1.21
   rem -------------------------------------
   ObjectTemplate.SetMinRotation 0/0/-5000
   ObjectTemplate.SetMaxRotation 0/0/5000
   ObjectTemplate.SetMaxSpeed 0/0/55000
   ObjectTemplate.SetAcceleration 0/0/55000
   ObjectTemplate.SetInputToRoll c_PIThrottle
   ObjectTemplate.SetAutomaticReset 1
   ObjectTemplate.SetEngineType c_ETCar
   ObjectTemplate.SetTorque 10.5
   ObjectTemplate.SetDifferential 7
   ObjectTemplate.SetNumberOfGears 5
   ObjectTemplate.SetGearUp 0.95
   ObjectTemplate.SetGearDown 0.4


Go to the ObjectTemplate properties list page, ObjectTemplate page, All Properties list, or Main scripting page.