Usage:
ObjectTemplate.AiTemplate
name
Argument values:
argument 1: | AA_Allies, AA_BaseMainGun, AT, AT25, AT25MainGun, AT_Alt, AW52, AW52Bombs, AW52Rockets, Afrhouse_m1, AichiVal, AichiValBombs, AichiValMachineGun, Aichival-T, Aichival-TBombs, Aichival-TMGAI, Aichival-TMachineGun, ... |
Description: Set in the Objects.con and Weapons.con files for weapons and vehicles. This property links the object to the AI object made with AiTemplate.Create <name> in the corresponding AI/Objects.con or AI/Weapons.con file.
Every PCO (Player Controlled Object, e.g. a weapon or vehicle) needs its own section in Ai/Objects.con, so that AI (bots) can know about it. This is also required if you include another object (i.e. a turret mounted MG) which has its own code. Similarly, every Firearm you create in Weapons.con needs its own section in its Ai/Weapons.con.
Used in object types (and how often in each type): Bundle (16%), FireArms (85%), HandFireArms (66%), Kit (96%), Obstacle (13%), PlayerControlObject (89%), simpleobject (5%)
Used in a total of 549 .con files: Commonsoldierdata.inc, Objects.con, Weapons.con
Parent directories of these .con files: objects/Vehicles, objects/Vegetation, objects/Stationary_Weapons, objects/Soldiers, objects/MOVE_FILES, objects/Items, objects/HandWeapons, objects/Buildings, Bf1942/Levels
Example: (from objects/Vehicles/Land/Ho-Ha/Objects.con)
rem *** Ho-Ha ***
ObjectTemplate.Create PlayerControlObject Ho-Ha
ObjectTemplate.NameTagOffset 0/-0.6/2
ObjectTemplate.SetNetworkableInfo HoHaInfo
ObjectTemplate.SaveInSeparateFile 1
ObjectTemplate.CullRadiusScale 5
ObjectTemplate.HasMobilePhysics 1
ObjectTemplate.HasDynamicShadow 1
ObjectTemplate.ExplosionRadius 8
ObjectTemplate.ExplosionDamage 5
ObjectTemplate.ExitTimer 1
ObjectTemplate.Drag 2
ObjectTemplate.Mass 15000
ObjectTemplate.HasCollisionPhysics 1
ObjectTemplate.HasResponsePhysics 1
ObjectTemplate.HasArmor 1
ObjectTemplate.SpeedMod 2
ObjectTemplate.Hitpoints 100
ObjectTemplate.Maxhitpoints 100
ObjectTemplate.Material 45
ObjectTemplate.CriticalDamage 16
ObjectTemplate.HpLostWhileCriticalDamage 1.5
ObjectTemplate.ExplosionForceMod 13
ObjectTemplate.HpLostWhileUpSideDown 10
ObjectTemplate.HpLostWhileDamageFromWater 10
ObjectTemplate.AddArmorEffect 60 e_HoHaDamage 0/2/1.9
ObjectTemplate.AddArmorEffect 16 e_HoHaFire 0.05/0.7/2.5
ObjectTemplate.AddArmorEffect 0 e_ExplGas 0/0/0
ObjectTemplate.AddArmorEffect 0 e_scrapmetal 0/0/0
ObjectTemplate.AddArmorEffect -1 WaterWaterExplosion 0/0/0
ObjectTemplate.DamageFromWater 1
ObjectTemplate.AiTemplate Hanomag
rem -------------------------------------
ObjectTemplate.AddTemplate lodHoHa
rem -------------------------------------
ObjectTemplate.SetSoldierExitLocation -2.5/0/0 0/0/0
ObjectTemplate.GUIIndex 59
ObjectTemplate.SetVehicleIcon "Vehicle/IconHoHa.tga"
ObjectTemplate.SetVehicleIconPos 90/75
ObjectTemplate.SetPrimaryAmmoBar ABNone
ObjectTemplate.SetCrossHairType CHTNone
ObjectTemplate.SetVehicleCategory VCLand
ObjectTemplate.SetVehicleType VTApc
ObjectTemplate.SetToolTipType TTApc
ObjectTemplate.SetMinimapIcon "Minimap/minimap_icon_apc_16x16.tga"
ObjectTemplate.HasRestrictedExit 1
Go to the ObjectTemplate properties list page, ObjectTemplate page, All Properties list, or Main scripting page.