Add Cargo to mission
Posted: Tue Apr 09, 2024 3:15 am
I am trying to script a mission to transport cargo in an amphibious assault, but I can't find a command to assign the cargo I want to move. If I assign it to move all available cargo, it seems to work but if I want to assign specific cargo, I can't seem to make that work...
Per the documentation, I have been trying to use addAssignedCargo on the Mission wrapper, but I get 'attempt to call a nil value (method 'addAssignedCargo')'.
I have tried (ms is a mission wrapper)
ms:addAssignedCargo()
ms:addAssignedCargoMount()
ScenEdit_AddAssignedCargo()
But all of them return the same type of error.
Has anyone gotten this to work? What is the correct command to add cargo to a cargo mission in Lua?
Thanks
Per the documentation, I have been trying to use addAssignedCargo on the Mission wrapper, but I get 'attempt to call a nil value (method 'addAssignedCargo')'.
I have tried (ms is a mission wrapper)
ms:addAssignedCargo()
ms:addAssignedCargoMount()
ScenEdit_AddAssignedCargo()
But all of them return the same type of error.
Has anyone gotten this to work? What is the correct command to add cargo to a cargo mission in Lua?
Thanks