Setting Up Re-supply

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
obrien979
Posts: 33
Joined: Fri May 18, 2018 2:10 pm
Location: Germany

Setting Up Re-supply

Post by obrien979 »

Before I slam my head against the table anymore, I figured I would ask te professionals. I have a few Lua Scripts that I have managed to master (very few), so I decided t try and create a script that would reload an Airbase Magazines with weapons, but only the magazines were below a set value. For example, I have AH-64Es stationed at an Airbase, I have added enough AGM-114K (HELLFIRE) missiles for one reload per Helicopter. AS the mission progresses thes A/C will be firing off the missiles alot!

I was hoping to create a Lua script that looks at the current amount of said munition in the Airbase's magazines, then subtracts that from a given constant number (representing the max amount allowed to be stored), then reloads the magazines with the difference value. SO if the Magazine has 25 missiles and the max amount allowed is 50, I would want the script to only add an additional 25.

I hope that I made this as clear as I could.

V/R,

V/R,
Brandon "OB" OBrien
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Setting Up Re-supply

Post by KnightHawk75 »

See if this system\framework works for your needs (with adjusted times etc) before building your own, which can be done of course, but can get involved.

Demeter - Automated Logistic System
fb.asp?m=4843206
Post Reply

Return to “Lua Legion”