me and archangle are currently working on an ammo system for the battle tech mod but we have yet to decide on anything working yet.
here is what i am asking him for lua wise but i would like some advice on if this is feasible and if there might be better ways to do this.
does this sound simple enough to make a ammunition resource system work?all i need is a lua that allows for some kind of special "flag" in any units cob to be detected (with in specified range) and changed from a 'control unit' (the ammo trucks). i dont think it would use alot of resources since the only units detecting flags with in the radius would be ammo vehicles.
heres how i can see it working. you build an ammo truck (or dude, what ever) and you tell him to patrol making at least one spot close to a ammo supply point (building) that has a flag(doesnt change) but tells the ammo truck its full again once it gets close enough (simulating refill at supply point and taking supplies to the lines) then the rest of the patrol can go thru the forces in what ever organization necessary detecting units with 'load me up' like flags (a simple flag they throw when low on ammo that can be deteerminded its script), and once their flag is changed by the 'control unit' (ammo truck) the units automatically refill them selves (im thinking not cycling, but only when firing detect if they are empty which wont fire at all, or have been reloaded and then can fire and reset the ammo count therefore reducing computer resources on all units cycling detection on ammo refill status). and the ammo trucks reduce a count every time they detect and change a 'need' flag to 'refill' (maybe allow the flags to have 3 settings: dectable needed, ignored refill, to tell units to refill once, and good, which is nill to detection and the units using the flags as well) so they can only refit so many and are forced to return to ammo points (so a way to jam the detection and changing flags similar to jamming weapons is necessary).
oh yeah this is would be just the very basics, a full working version would probably have low ammunition indicator guis and what not, but we arent to concerned with that now.