From Pilot_51's Wiki
Jump to navigation Jump to search

MDT description

This property sets the type of ammo that is to be displayed. Argument 1 specifies the format. This type is also used by vehicles' HUD displays. Here are the values and what they mean:

ATNone - for weapons that have no ammo, e.g. knives ATAmmoBar - for weapons that use a sliding full and empty icon for their ammo bar. ATIcon - for weapons with an icon that does not change, e.g. bazooka, landmine. ATIconAndHeatBar - for the medpack, as the "heat" bar shows the healing level left. ATIconAndReloadBar - for the engineer repair pack, with the "reload" bar showing repair level left. ATIconAndStrengthBar - for grenades, as the right mouse button can vary the strength of the throw.

If the format set by SetHudAmmoType is ATAmmoBar, then these properties are set:

 ObjectTemplate.SetAmmoBar "Ingame/*_empty_32x64.dds"
 ObjectTemplate.SetAmmoBarFill "Ingame/*_full_32x64.dds"
 ObjectTemplate.SetAmmoBarSize #

SetAmmoBar and SetAmmoBarFill are used to show how full the ammo clip is, using images of the clip itself. The SetAmmoBarSize is the height of the useful area of the ammo bar. All textures have to be a power of 2 along their edges, and all ammo bars are 32 or 64 pixels wide, but the useful height varies. If SetHudAmmoType is set to any of the ATIcon* types, then this property is set:

 ObjectTemplate.SetAmmoIcon "Ammo/Icon_*.tga"

See the HUD Icon Tutorial for details.

Source and more details

Additional Description