Usage:
ObjectTemplate.AddTemplate
name
Argument values:
argument 1: | 1PBritCommandoLeftHand, 1PBritCommandoRightHand, 1PBritSoldierLeftHand, 1PBritSoldierRightHand, 1PGerEliteSoldierLeftHand, 1PGerEliteSoldierRightHand, 1PGerSoldierLeftHand, 1PGerSoldierRightHand, 1PJapSoldierLeftHand, ... |
Description: This command property is used to attach a child object to another object. Any SetPosition and SetRotation commands following this will apply to the attached object, until another AddTemplate command is encountered.
The first argument is the unique name of the object, set by a Create command.
For an example, see the HasStartEffect property, which shows a muzzle-flash effect attached to the barrel of a defgun.
Related properties: Create, SetIsFirstPersonPart, SetPosition, SetRandomGeometries, SetRotation
Used in object types (and how often in each type): ActiveKitPart (100%), AnimatedBundle (48%), BFSoldier (67%), Bundle (87%), Camera (1%), ControlPoint (100%), EffectBundle (96%), Engine (69%), FireArms (56%), Flag (100%), HandFireArms (100%), Kit (100%), LandingGear (53%), LodObject (100%), Obstacle (100%), PlayerControlObject (100%), Projectile (39%), RotationalBundle (77%), Spring (44%), simpleobject (1%)
Used in a total of 1317 .con files: Allies_eastairfield_spawn.con, Allies_factory_spawn.con, Allies_westairfield_spawn.con, Commonsoldierdata.inc, Controlpointtemplates.con, Ctf.con, Effects.con, Init.con, Objects.con, Physics.con, Projectile.con, Weapons.con
Parent directories of these .con files: objects/Vehicles, objects/Vegetation, objects/Stationary_Weapons, objects/Soldiers, objects/Objectives, objects/MOVE_FILES, objects/Items, objects/HandWeapons, objects/Effects, objects/Buildings, Bf1942/Levels
Example: (from objects/Vehicles/Sea/PrinceOW/Objects.con)
rem *** PrinceOW ***
ObjectTemplate.Create PlayerControlObject PrinceOW
ObjectTemplate.SetNetworkableInfo PrinceOWBodyInfo
ObjectTemplate.SaveInSeparateFile 1
ObjectTemplate.CullRadiusScale 5
ObjectTemplate.HasMobilePhysics 1
ObjectTemplate.Drag 3.25
ObjectTemplate.Mass 35000000
ObjectTemplate.HasCollisionPhysics 1
ObjectTemplate.HasResponsePhysics 1
ObjectTemplate.HasArmor 1
ObjectTemplate.Hitpoints 500
ObjectTemplate.Maxhitpoints 500
ObjectTemplate.Material 55
ObjectTemplate.CriticalDamage 100
ObjectTemplate.HpLostWhileCriticalDamage 5
ObjectTemplate.ExplosionForceMod 5
ObjectTemplate.DontClearTeamOnExit 1
ObjectTemplate.AddArmorEffect 500 em_ExFumePOW 0/34/3
ObjectTemplate.AddArmorEffect 500 em_ExFumePOW 0/34/-22
ObjectTemplate.AddArmorEffect 300 em_ExFumePOW 0/34/3
ObjectTemplate.AddArmorEffect 300 em_ExFumePOW 0/34/-22
ObjectTemplate.AddArmorEffect 300 em_PoWDamage 0/0/10
ObjectTemplate.AddArmorEffect 300 em_PoWDamage 0/0/50
ObjectTemplate.AddArmorEffect 300 em_PoWDamage 0/0/-30
ObjectTemplate.AddArmorEffect 250 em_ExFumePOW 0/34/-22
ObjectTemplate.AddArmorEffect 250 em_PoWDamage 0/0/10
ObjectTemplate.AddArmorEffect 250 em_PoWDamage 0/0/50
ObjectTemplate.AddArmorEffect 250 em_PoWDamage 0/0/-30
ObjectTemplate.AddArmorEffect 150 em_PoWDamage 0/0/10
ObjectTemplate.AddArmorEffect 150 em_PoWDamage 0/0/50
ObjectTemplate.AddArmorEffect 150 em_PoWDamage 0/0/-30
ObjectTemplate.AddArmorEffect 150 e_waterBoatSink 0/5/0
ObjectTemplate.AddArmorEffect 100 em_PoWDamage 0/0/10
ObjectTemplate.AddArmorEffect 100 em_PoWDamage 0/0/50
ObjectTemplate.AddArmorEffect 100 em_PoWDamage 0/0/-30
ObjectTemplate.AddArmorEffect 100 e_waterBoatSink 0/5/0
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf 19/6/-5
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf 17/5/-45
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf 14/5/-85
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf 13/5/25
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf 18/5/45
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf 16/5/65
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf 14/5/85
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf 0/5/115
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf 0/10/35
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf 0/10/-25
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf 0/10/-5
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf 0/3/-90
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf -19/6/-5
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf -17/5/-35
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf -14/5/-85
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf -13/5/25
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf -18/5/45
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf -16/5/65
ObjectTemplate.AddArmorEffect 100 e_waterBoatSinkEf -14/5/85
ObjectTemplate.AiTemplate PrinceOWAI
rem -------------------------------------
ObjectTemplate.AddTemplate lodPrinceOW
ObjectTemplate.AddTemplate PrinceOW_Floater
ObjectTemplate.SetPosition 0/14/110
ObjectTemplate.AddTemplate PrinceOW_Floater
ObjectTemplate.SetPosition -12.999/14/55
ObjectTemplate.AddTemplate PrinceOW_Floater
ObjectTemplate.SetPosition 13/14/55
ObjectTemplate.AddTemplate PrinceOW_Floater
ObjectTemplate.SetPosition -15.999/14/0
ObjectTemplate.AddTemplate PrinceOW_Floater
ObjectTemplate.SetPosition 16/14/0
ObjectTemplate.AddTemplate PrinceOW_Floater
ObjectTemplate.SetPosition -12.999/14/-54.999
ObjectTemplate.AddTemplate PrinceOW_Floater
ObjectTemplate.SetPosition 13/14/-54.999
ObjectTemplate.AddTemplate PrinceOW_Floater
ObjectTemplate.SetPosition 0/14/-109.999
rem -------------------------------------
ObjectTemplate.SetPcoId 0
ObjectTemplate.ArtPos 1
ObjectTemplate.DirBarXScale 110
ObjectTemplate.DirBarYScaleAbove 10
ObjectTemplate.DirBarYScaleBelow 0
ObjectTemplate.DirBarYScaleMin -90
ObjectTemplate.DirBarYScaleMax -80
ObjectTemplate.SetSoldierExitLocation 0/14.2/35.3 180/0/0
ObjectTemplate.GUIIndex 43
ObjectTemplate.SetVehicleIcon "Vehicle/Icon_princeow.tga"
ObjectTemplate.SetVehicleIconPos 80/78
ObjectTemplate.SetNumberOfWeaponIcons 1
ObjectTemplate.SetPrimaryAmmoIcon "Ammo/Icon_cannon.tga"
ObjectTemplate.SetPrimaryAmmoBar ABReloadBarOnly
ObjectTemplate.SetCrossHairType CHTIcon
ObjectTemplate.SetVehicleCategory VCSea
ObjectTemplate.SetVehicleType VTBattleship
ObjectTemplate.SetToolTipType TTBattleship
ObjectTemplate.SetMinimapIcon "Minimap/minimap_icon_battleship_64x64.tga"
ObjectTemplate.SetMinimapIconSize 64
Go to the ObjectTemplate properties list page, ObjectTemplate page, All Properties list, or Main scripting page.