Here is the code I was using. Even if unwilling to share example scripts that others may have worked hard on, I'd love if I could get any help on my work:
THIS WORKS: I used CTLD's built-in functions to spawn a crate via standard DCS trigger and DO Script:
ctld.spawnCrateAtZone("blue", 2701, "Crate Factory TEST") --spawns a BLUE coalition HMMWV at the trigger zone "crateSpawnTrigger"
THIS WORKS: I used CTLD's built-in functions to designate a trigger zone to be a crate dropzone and count every 5 seconds via normal DCS trigger Do Script:
ctld.cratesInZone("Crate Dropzone TEST",200)
THIS WORKS: I tried editing CTLD's crates in zone function as per below so that it adds to the flag value rather than just counting and replacing the value. I got that to work, so it is now adding onto a current flag value cumulatively. I had it pull the value and add 2 to it for every crate in the zone.
NEED HELP: My attempts to have the crate despawn immediately following it being counted is not working. I have marked the line in bold in the code quote below.
NEED HELP: The message to all to announce the delivery and supply count is also not working. I have marked the line in bold in the code quote below.
If anyone can help me with the message line and the despawn line I would be really appreciative! If I can get the despawn(destroy) line to work and the message to work then I'll have the crate supply delivery functioning! I would love any help at all.