

There is no need for "mortar1" to have a LOS on the target at which is firing with this trigger.

This is to simulate the time taken to transmit the coordinates by the BLUFOR forces to their mortar. I added a timer of a minimum of 2 minutes to activate the triggered mortar fire (see "timer" fields in the above screenshot). Then add the code shown above in the "ON ACT." field: that makes "mortar1" to fire at the position where the OPFOR (that is us in this case) was detected. The trigger activates when the OPFOR (in this case my troops are OPFOR) is detected by BLUFOR (in this case enemy rebels). Then create a trigger entity, big enough to cover the area of operations (a circle of 5,000 meters in this case). In the editor, create a mortar, name it "mortar1" and if you want it to have unlimited ammo, place the line of code seen in the initialization field. So I found this page, where the process of creating such a thing is just a handful of clicks and just two lines of code that is added straight into the editor's entities. But I always prefer something very simple and maintenance free.

(Arma 3 1.44) setAmmoCargo will have no effect if the vehicle doesn't support getAmmoCargo.I'm sure there are many scripts out there to have the enemy AI to shoot a mortar shell at you. So the tunguska can reload a total of 6 missiles from the ammo truck before the ammo capacity is depleted and needs to be set with setAmmoCargo.Ī similar thing applies with a vehicle's cfgVehicle Cost entry for repairing, and the vehicle's fuelCapacity entry when refuelling. Your typical truck has 300000 ammo capacity, and the tunguska's missiles have a Cost of 50000. While the amount of total 'ammo' that can be reloaded is defined in the truck/supply point's CfgVehicles entry, the amount each round of ammunition takes from that total is defined in the CfgAmmo 'Cost' entry for that round. Only post proven facts here! Add Note Posted on 31 Aug, 2011 PlacidBox Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums. The actual quantity to work with is determined by the model's class in CfgVehicles Groups: Vehicle Inventory Syntax Syntax: vehicleName setAmmoCargo ammoCargo Parameters: vehicleName: Object ammoCargo: Number Return Value: Nothing Examples Example 1: _ammoTruck1 setAmmoCargo 0.5 Additional Information See also: getAmmoCargo setFuelCargo setRepairCargo Notes Soldiers use individual magazines instead. Ammo resource is used to resupply vehicles that take ammo. Hover & click on the images for description Description Description: Set amount of ammo resources in cargo space of a rearm vehicle.
