Usage:
ObjectTemplate.Grip
name
Argument values:
argument 1: | c_PGFContactGrip, c_PGFDummyGrip, c_PGFEngineDummyGrip, c_PGFEngineGrip, c_PGFRollGrip, c_PGFRollGripWhenOccupied, c_PGFcontactGrip; most commonly c_PGFEngineDummyGrip |
Description: This enables Spring objects (wheels) to grip the ground and use that traction to move the vehicle.
Grip takes pre-defined grip types, for example:
c_PGFEngineGrip - used in pairs, only for land vehicles (jeeps, tanks, etc). Triplets also work. This is the wheel driven by the engine. To have a true 4WD change c_PGFRollGrip to c_PGFEngineGrip in a front wheel drive object. WARNING, this can give a maximum of a 4WD; if you want more drive wheels use c_PGFEngineDummyGrip.
c_PGFEngineDummyGrip - again, used in pairs, only for land vehicles. Used for wheels that need to rotate when you move, but without any drive traction. Use in the tank or in an 8x8 when four wheels are already attached to the engine. The wheel rotates even though it does not have an effect. Ideal for the four outlying wheels of a tank (though not done this way in BF 1942, i.e., the tank wheels don't rotate).
c_PGFRollGrip - for wheeled vehicles. Used in jeeps, APCs, and the Katyusha truck.
c_PGFRollGripWhenOccupied - used in aircraft wheels, in triplets for planes (the three wheels). These wheels are free, they spin independently of the engine's settings.
The jeeps each have 2 c_PGFRollGrip for the front wheels and 2 c_PGFEngineGrip for the back.
The Grip property makes the wheel roll as the vehicle moves (provided it's occupied) and the strength (SetStrength) and damping (SetDamping) set the characteristics of the spring. A higher strength means increases the reaction of the spring, as it releases after being pushed in and the dampening smooths the motion a little. At high strength the vehicle tends to bounce in a jittery kind of fashion.
Related properties: Geometry, HasCollisionPhysics, HasMobilePhysics, SeatAnimationLowerBody, SeatAnimationUpperBody
Used in object types (always present 100% of the time): Spring
Used in a total of 84 .con files: Objects.con, Physics.con
Parent directories of these .con files: objects/Vehicles, Bf1942/Levels
Example: (from objects/Vehicles/Air/Mosquito/Physics.con)
rem *** MosquitoWheelLeft ***
ObjectTemplate.Create Spring MosquitoWheelLeft
ObjectTemplate.Geometry rh_dhmosquito_vhjul_m1
ObjectTemplate.HasMobilePhysics 1
ObjectTemplate.HasCollisionPhysics 1
ObjectTemplate.HasResponsePhysics 1
ObjectTemplate.Grip c_PGFRollGripWhenOccupied
rem -------------------------------------
ObjectTemplate.AddTemplate e_WaterTouchPlane
ObjectTemplate.AddTemplate e_wdustPlane
ObjectTemplate.AddTemplate e_wdustPlaneL
rem -------------------------------------
ObjectTemplate.SetStrength 24
ObjectTemplate.SetDamping 12
Go to the ObjectTemplate properties list page, ObjectTemplate page, All Properties list, or Main scripting page.