Obstacle Type

The Obstacle object type is created by ObjectTemplate.Create.

Players can pass through this type of object, and it can cause damage to soldiers, depending on its properties. It is used for barbed wire and fences. For example, barbed wire is set to act like a projectile. The collision mesh defines the amount of damage.

Used in a total of 15 .con files: Objects.con

Parent directories of these .con files: objects/MOVE_FILES, objects/Buildings

Example: (from objects/MOVE_FILES/Stebarbwire/Objects.con)
   ObjectTemplate.Create Obstacle stebarbwire_m1
   ObjectTemplate.Geometry stebarbwire_m1
   ObjectTemplate.SetHasCollisionPhysics 1
   ObjectTemplate.AddToCollisionGroup c_CGProjectiles
   ObjectTemplate.AiTemplate stebarbwire_m1
   ObjectTemplate.AddTemplate e_Barbwire
   ObjectTemplate.SetPosition 0/0/0
   ObjectTemplate.SetRotation 0/0/0

Properties used with this type of object:
   ObjectTemplate.AddTemplate
   ObjectTemplate.AddToCollisionGroup
   ObjectTemplate.AiTemplate
   ObjectTemplate.Create
   ObjectTemplate.Geometry
   ObjectTemplate.HasCollisionPhysics
   ObjectTemplate.SetHasCollisionPhysics
   ObjectTemplate.SetPosition
   ObjectTemplate.SetRotation


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