Unload Cargo
Posted: Sun Mar 07, 2021 10:07 am
Good afternoon,
A question about cargo, hope someone can help me.
I made:
local b = ScenEdit_GetUnit ({name='C-130H-30 Hercules', guid='50PVO4-0HM71CDNOUTI0'})
print (b.cargo)
Giving me:
{ [1] = { guid = '50PVO4-0HM71CDNOUTI0', cargo = { [1] = { quantity = 5, mass = 0, status = 'Operational', name = 'Infantry Section [7.62mm MG/Unguided Infantry Anti Tank Weapon]', crew = 4, guid = '50PVO4-0HM71CDNOUTSA', dbid = 2884, area = 0 }, [2] = { quantity = 5, mass = 0, status = 'Operational', name = 'Forward Observer + Sensor Tripod (AN/PAQ-1 LTD)', crew = 3, guid = '50PVO4-0HM71CDNOUTT8', dbid = 2260, area = 0 } }, name = 'C-130H-30 Hercules' } }
Then I:
ScenEdit_UnloadCargo('50PVO4-0HM71CDNOUTI0', {{1,3037}})
The second print gives me:
{ }
The A/C has no cargo left.
What am I doing wrong.
with regards Gert-Jan
I tried this from a boat:
ScenEdit_UnloadCargo ('50PVO4-0HM71CDNOQJT1', {{2,2884}})
firgured the number (2) is the amount but it only give 1 inf unloaded but substracts 2 units from the boat.
Looks like the boat is not total empty afterwards, the A/C is. Both just puts 1 unit in play.
A question about cargo, hope someone can help me.
I made:
local b = ScenEdit_GetUnit ({name='C-130H-30 Hercules', guid='50PVO4-0HM71CDNOUTI0'})
print (b.cargo)
Giving me:
{ [1] = { guid = '50PVO4-0HM71CDNOUTI0', cargo = { [1] = { quantity = 5, mass = 0, status = 'Operational', name = 'Infantry Section [7.62mm MG/Unguided Infantry Anti Tank Weapon]', crew = 4, guid = '50PVO4-0HM71CDNOUTSA', dbid = 2884, area = 0 }, [2] = { quantity = 5, mass = 0, status = 'Operational', name = 'Forward Observer + Sensor Tripod (AN/PAQ-1 LTD)', crew = 3, guid = '50PVO4-0HM71CDNOUTT8', dbid = 2260, area = 0 } }, name = 'C-130H-30 Hercules' } }
Then I:
ScenEdit_UnloadCargo('50PVO4-0HM71CDNOUTI0', {{1,3037}})
The second print gives me:
{ }
The A/C has no cargo left.
What am I doing wrong.
with regards Gert-Jan
I tried this from a boat:
ScenEdit_UnloadCargo ('50PVO4-0HM71CDNOQJT1', {{2,2884}})
firgured the number (2) is the amount but it only give 1 inf unloaded but substracts 2 units from the boat.
Looks like the boat is not total empty afterwards, the A/C is. Both just puts 1 unit in play.