PDA

View Full Version : global effect commands for cargo filling with ammo



d3nn16
Jun 6 2009, 13:07
Hi

I just checked the list of new commands in the Biki but didn't find any equivalents with global effects to addMagazineCargo, addWeaponCargo, clearMagazineCargo and clearWeaponCargo.
Do these commands have same behaviour in Arma 2 as they had in Arma 1 ?
Does the cargo space still become local to each player after using the addMagazineCargo and addWeaponCargo commands ?

What I want to do is put a price on each weapon and magazine.
Then a player will have the weapons and magazines he chose in a dialog loaded into a vehicle.
I know I could have used for example a dialog available to each soldier when they are close to an ammo truck and they could buy any weapon they want.
But what I want to do is have support players load ammo in trucks at start base then drive these ammo loaded vehicles to the combat area, this way the enemy has the opportunity to ambush these convoys.

d3nn16
Jun 6 2009, 13:27
Another thing I would like to do in an mp map is give a price to each vehicle weapon magazine like SABOT, HEAT, guided missiles etc.
From what I tested in Arma 1 it is not possible to rearm vehicles after adding these magazines to the cargo space of ammo trucks.
So what I do is have a designated player that is near enough to an ammo truck and inside the vehicle needing magazines (so the vehicle is local to him) use a dialog that executes addMagazine command, when using this command cash is subtracted from the side's total cash.
The problem in Arma 1 is that the addMagazine command only adds the mag for the weapon in the main turret of the vehicle, so in the Blackhawk only one of the machineguns gets mags.
Is there a way in Arma 2 (or Arma 1) to add magazines for the secondary turrets as well ?

CarlGustaffa
Jun 6 2009, 16:03
Does this mean that the ammo truck is still bugged in this respect?

d3nn16
Jun 6 2009, 20:42
No the ammo truck works because it rearms all weapons/turrets in vehicle.
But there is a small bug I noticed, for example when M1A1 runs out of mags and you rearm at ammo truck, instead of giving 2 mags which is the amount the tank starts with for commander MG it only gives 1 and it only gives a mag of HEAT shells and no mag of SABOT shells.
Another thing I noticed is that if you place a tank in editor and in the unit dialog you set ammunition slider to 0 then the M1A1 won't be able to rearm at ammo truck. But if you set the slider just above the 0 position and you fire all of your rounds left then you are able to rearm at ammo truck.

From this behavior I guess the BIS script that is used behind the ammo truck is one that checks the list of magazines of a vehicle and sets their round counter to max value.