Usage:
ObjectTemplate.AddAmmoType
number number number boolean
Argument values:
argument 1: | range is 0 to 16; most commonly 0 |
argument 2: | -1 |
argument 3: | 1.2 1.5 10 100 15 2 20 4 4.0 |
argument 4: | 0; most commonly 0 |
Description: AddAmmoType describes which ammo type a supply point provides (see AmmoType), and how much per second. A supply point (e.g. ammo box, repair pad, hangar, APC) can provide more than one type of ammo.
The first argument is the type of ammo provided. The second argument is the amount of ammo this ammo supply point has to give out; "-1" means "infinite", and setting it to a number limits the number of reloads. The third argument is the amount of ammo of that type that is resupplied per second. The fourth is how fast the ammo box itself reloads, if argument two is not set to "-1" (this last argument is not used in any BF1942 battles, and so, according to the coders, may not actually work).
Here is an example, for the soldier ammo box:
ObjectTemplate.AddAmmoType 1 -1 15 0 ObjectTemplate.AddAmmoType 2 -1 1.2 0 ObjectTemplate.AddAmmoType 3 -1 1.2 0
So, bullets are resupplied at 15 rounds per second, and grenades, exppacks, mines, and bazooka shells are resupplied at 1.2 per second.
The ammo boxes and APCs are interesting in that two supply points are defined for each, one with a low Radius that supplies and heals soldiers, and one outside, that supplies only vehicles with WorkOnVehicles.
Here is the ammo type list, same as for AmmoType:
1 - rifles, handguns, SMGs
2 - exppack, landmine
3 - bazooka, Calliope tank shells
6 - jeep and scout car horn
7 - axis bombs
8 - MG42, axis plane guns
9 - allied bombs, Junkers bombs
10 - Browning MG, allied plane guns, Junkers' belly gun
14 - PT boat machineguns
15 - PT boat torpedoes
Related properties: AmmoType, Radius, WorkOnVehicles
Used in object types (and how often in each type): SupplyDepot (87%)
Used in a total of 30 .con files: Objects.con, Weapons.con
Parent directories of these .con files: objects/Vehicles, objects/MOVE_FILES, objects/Buildings, Bf1942/Levels
Example: (from objects/Buildings/Common/Hangar1_it/Objects.con)
ObjectTemplate.Create SupplyDepot AirplaneRepairpoint_it
ObjectTemplate.Radius 20
ObjectTemplate.Team 0
ObjectTemplate.AddVehicleType tiger -1 2 0
ObjectTemplate.AddVehicleType Panzeriv -1 2 0
ObjectTemplate.AddVehicleType hanomag -1 2 0
ObjectTemplate.AddVehicleType wespe -1 2 0
ObjectTemplate.AddVehicleType kubelwagen -1 2 0
ObjectTemplate.AddVehicleType sherman -1 2 0
ObjectTemplate.AddVehicleType m3a1 -1 2 0
ObjectTemplate.AddVehicleType priest -1 2 0
ObjectTemplate.AddVehicleType willy -1 2 0
ObjectTemplate.AddVehicleType m10 -1 2 0
ObjectTemplate.AddVehicleType chi-ha -1 2 0
ObjectTemplate.AddVehicleType T34 -1 2 0
ObjectTemplate.AddVehicleType T34-84 -1 2 0
ObjectTemplate.AddVehicleType corsair -1 4 0
ObjectTemplate.AddVehicleType sbd -1 4 0
ObjectTemplate.AddVehicleType sbd-t -1 4 0
ObjectTemplate.AddVehicleType mustang -1 4 0
ObjectTemplate.AddVehicleType spitfire -1 4 0
ObjectTemplate.AddVehicleType bf109 -1 4 0
ObjectTemplate.AddVehicleType stuka -1 4 0
ObjectTemplate.AddVehicleType aichival -1 4 0
ObjectTemplate.AddVehicleType aichival-t -1 4 0
ObjectTemplate.AddVehicleType zero -1 4 0
ObjectTemplate.AddVehicleType yak9 -1 4 0
ObjectTemplate.AddVehicleType Sturmgeschutz -1 4 0
ObjectTemplate.AddVehicleType M3GMC -1 4 0
ObjectTemplate.AddVehicleType M3Grant -1 4 0
ObjectTemplate.AddVehicleType m11-39 -1 4 0
ObjectTemplate.AddVehicleType BF110 -1 4 0
ObjectTemplate.AddVehicleType Mosquito -1 4 0
ObjectTemplate.AddAmmoType 0 -1 10 0
ObjectTemplate.WorkOnVehicles 1
ObjectTemplate.WorkOnSoldiers 0
Go to the ObjectTemplate properties list page, ObjectTemplate page, All Properties list, or Main scripting page.