Spring Type

The Spring object type is created by ObjectTemplate.Create.

Springs can be thought of as "wheels" for the Battlefield 1942 game engine. They are what actually produces the thrust for jeeps, tanks, and APCs, as well as allowing planes to land and take off. Any dynamic, mobile object that needs to interact with the landscape should have springs. Springs generate thrust by being children of an Engine object, to make them roll, while others are simple passive and roll on their own. This can be changed with the Grip property. Springs also must have a Geometry property with a proper collision model to work correctly.

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/Land/m3a1/Physics.con)
   rem *** M3A1Spring1 ***
   ObjectTemplate.Create Spring M3A1Spring1
   ObjectTemplate.SetNetworkableInfo SpringInfo
   ObjectTemplate.Geometry M3A1_Wheel1_M1
   ObjectTemplate.HasMobilePhysics 1
   ObjectTemplate.HasCollisionPhysics 1
   ObjectTemplate.HasResponsePhysics 1
   ObjectTemplate.Grip c_PGFRollGrip
   rem -------------------------------------
   ObjectTemplate.AddTemplate e_wdustWheelFL
   ObjectTemplate.AddTemplate e_wdustWheelF
   rem -------------------------------------
   ObjectTemplate.SetStrength 28
   ObjectTemplate.SetDamping 7

Properties used with this type of object:
   ObjectTemplate.AddTemplate
   ObjectTemplate.Create
   ObjectTemplate.CreateInvisible
   ObjectTemplate.Damping
   ObjectTemplate.Geometry
   ObjectTemplate.Grip
   ObjectTemplate.HasCollisionPhysics
   ObjectTemplate.HasMobilePhysics
   ObjectTemplate.HasResponsePhysics
   ObjectTemplate.NetworkableInfo
   ObjectTemplate.SetDamping
   ObjectTemplate.SetNetworkableInfo
   ObjectTemplate.SetRotation
   ObjectTemplate.SetStrength
   ObjectTemplate.Strength


Go to the ObjectTemplate type list page, ObjectTemplate page, All Types list, Class list, CON file list, or Main scripting page.