OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 456820 on 15 May 2005, 11:29:08
-
okay i have a Vulcan wich when it uses all its ammo i want it to automatically rearm instead of it calling for support because the rearm trucks get blown up from the choppers
So what would i put in a trigger, init field what ever needed to see when the vulcan has no ammo left to give it about 3/4 of full ammo.
Also sorry i spelt the title wrong can someone please sort it out. im a bit tired
-
Try:
Condition
tankname ammo "VulcanCannon" < 0
Activate:
tankname removeMagazines "VulcanCannon";tankname addMagazine "VulcanCannon"
However this will give you a full load of ammo (one magazine is a full load) . The reason for removing the magazine first is so that the new magazine replaces what is already there and does not add to it.
I have not tested this. You may need to check out the command ammo in the comref
http://www.ofpec.com/editors/comref.php?letter=A#ammo (http://www.ofpec.com/editors/comref.php?letter=A#ammo)
-
thanks for that but how do i make that happen when the vulcan is out of ammo
-
I was editing when you were posting. Check my first reply again.
-
oh okay i will test that now cheers