Jump to content

Is unit out of ammo


wolle

Recommended Posts

http://wiki.hoggit.us/view/Part_2#Unit

Unit.getAmmo() returns a table of the ammunition. If all ammunition has been expended then it will simply return an empty table. Consider it 100% accurate for aircraft, however ground vehicles can get a little confusing due to how ammunition storage works with them. For instance a Bradley will show that is has 7 or 8 Tows available even though only 2 are loaded into a launcher at a time. So ground vehicles count weapons in "storage" even though a weapon isn't completely ready to fire at that moment. Sams suffer the most from this issue as they have twice the number of missiles in storage pretty much all of the time.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Unit.getAmmo() returns a table of the ammunition. If all ammunition has been expended then it will simply return an empty table.

 

Hi,

 

is there a way to include this sentence in a script that returns "TRUE" if a defined unit (or more than one of the same type) in a named group is out of ammo?

 

I was thinking to create "re-ammo" small area about 3 km to the FLOT, made of M818 vehicles, and since one group (IE. tanks, 3xAbrams platoon) is out of big-bullet ammo he will execute a pre-inserted route that move to the re-ammo area, holds for 5 min and then go back to the original position.

 

The routing part it would be realized with your patrol script and an "hold" function, while I need the "out-of-ammo" script to interrupt the "hold" action.

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...