SetPrimaryAmmoIcon Property

Usage:
   ObjectTemplate.SetPrimaryAmmoIcon image

Argument values:

argument 1:    "Ammo/Ammobar_icon_wasserfall_64x64.tga", "Ammo/Icon_bomb.tga", "Ammo/Icon_bullet.tga", "Ammo/Icon_cannon.tga", "Ammo/Icon_rocket.tga", "Ammo/Icon_torpedo.tga"

Description: This is one of a few related properties. These are:

  ObjectTemplate.SetNumberOfWeaponIcons #
  ObjectTemplate.SetPrimaryAmmoIcon "Ammo/Icon_*.tga"
  ObjectTemplate.SetPrimaryAmmoBar ABTypeName
  ObjectTemplate.SetSecondaryAmmoIcon "Ammo/Icon_*.tga"
  ObjectTemplate.SetSecondaryAmmoBar ABTypeName

These all have to do with the ammunition/overheating status display for each weapon, the primary (left mouse fire) and secondary (right mouse), if any. SetNumberOfWeaponIcons specifies the number of weapons that have a display on the HUD, a value from 0 to 2. SetPrimaryAmmoBar sets the type of display needed for the weapon, similar to how handweapons use this value in SetHudAmmoType. Note that the defined names are different, though, starting with AB instead of AT. Here are the values used for vehicle weapons:

ABNone - for positions that have no weapons; set for vehicles without weapons
ABAmmoBar - for weapons with no reload wait time but can run out of ammo, like fighter plane guns
ABAmmoBarHeatBar - for weapons that overheat and run out of ammo, like machineguns on tanks
ABAmmoBarReloadBar - for weapons that need time to reload, like tank or ship guns
ABHeatBarOnly - for weapons that overheat but never run out of ammo, like stationary MGs
ABReloadBarOnly - never runs out of ammo but wait to reload, e.g. destroyer and battleship guns
ABIconOnly - never overheats, never runs out of ammo, never needs to reload, e.g. flak guns

If SetPrimaryAmmoBar is any setting except for ABNone, the SetPrimaryAmmoIcon property is set, to define an image of the type of ammo used (bullet, rocket, etc).

See the HUD Icon Tutorial for more details and examples.

Related properties: SetNumberOfWeaponIcons, SetPrimaryAmmoBar, SetSecondaryAmmoIcon, SetSecondaryAmmoBar

Used in object types (and how often in each type): PlayerControlObject (43%)

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

Parent directories of these .con files: objects/Vehicles, objects/Stationary_Weapons, Bf1942/Levels

Example: (from objects/Vehicles/Air/Mosquito/Objects.con)
   rem *** Mosquito ***
   ObjectTemplate.Create PlayerControlObject Mosquito
   ObjectTemplate.SetNetworkableInfo Mosquito_body_info
   ObjectTemplate.SaveInSeparateFile 1
   ObjectTemplate.HasMobilePhysics 1
   ObjectTemplate.HasDynamicShadow 1
   ObjectTemplate.Drag 0.061
   ObjectTemplate.Mass 3000
   ObjectTemplate.InertiaModifier 0.95/0.943/0.968
   ObjectTemplate.HasCollisionPhysics 1
   ObjectTemplate.HasResponsePhysics 1
   ObjectTemplate.ExplosionRadius 8
   ObjectTemplate.ExplosionDamage 5
   ObjectTemplate.HasArmor 1
   ObjectTemplate.AngleMod 1
   ObjectTemplate.SpeedMod 2
   ObjectTemplate.Hitpoints 130
   ObjectTemplate.Maxhitpoints 130
   ObjectTemplate.Material 60
   ObjectTemplate.CriticalDamage 20
   ObjectTemplate.HpLostWhileCriticalDamage 1.5
   ObjectTemplate.ExplosionForceMod 15
   ObjectTemplate.HpLostWhileUpSideDown 10
   ObjectTemplate.HpLostWhileDamageFromWater 10
   ObjectTemplate.AddArmorEffect 70 em_MosquitoDamage -2.5/0.102/2.51
   ObjectTemplate.AddArmorEffect 70 em_PlaneDamage -2.5/-0.203/1.61
   ObjectTemplate.AddArmorEffect 70 em_MosquitoDamage 2.5/0.102/2.51
   ObjectTemplate.AddArmorEffect 70 em_PlaneDamage 2.5/-0.203/1.61
   ObjectTemplate.AddArmorEffect 25 e_MosquitoFire 2.5/0.2/0.35
   ObjectTemplate.AddArmorEffect 25 e_MosquitoFire -2.5/0.2/0.35
   ObjectTemplate.AddArmorEffect 0 e_ExplGas 0/0/0
   ObjectTemplate.AddArmorEffect 0 e_scrapmetal_Mosquito 0/0/0
   ObjectTemplate.AddArmorEffect -1 WaterWaterExplosion 0/0/0
   ObjectTemplate.DamageFromWater 1
   ObjectTemplate.AiTemplate Mosquito
   rem -------------------------------------
   ObjectTemplate.AddTemplate lodMosquito
   rem -------------------------------------
   ObjectTemplate.SetSoldierExitLocation -3.2/-0.4/-3.5 0/0/0
   ObjectTemplate.GUIIndex 69
   ObjectTemplate.SetVehicleIcon "Vehicle/Icon_mosquito.tga"
   ObjectTemplate.SetVehicleIconPos 78/105
   ObjectTemplate.SetNumberOfWeaponIcons 2
   ObjectTemplate.SetPrimaryAmmoIcon "Ammo/Icon_bullet.tga"
   ObjectTemplate.SetPrimaryAmmoBar ABAmmoBar
   ObjectTemplate.SetSecondaryAmmoIcon "Ammo/Icon_bomb.tga"
   ObjectTemplate.SetSecondaryAmmoBar ABAmmoBarReloadBar
   ObjectTemplate.SetCrossHairType CHTIcon
   ObjectTemplate.SetVehicleCategory VCAir
   ObjectTemplate.SetVehicleType VTLevelBomber
   ObjectTemplate.SetToolTipType TTMosquito
   ObjectTemplate.SetMinimapIcon "Minimap/minimap_icon_plane_16x16.tga"


Go to the ObjectTemplate properties list page, ObjectTemplate page, All Properties list, or Main scripting page.