Jump to content
Grenadier ITF

detect object in cargo (ACE3)

Recommended Posts


I would like to know if any of you know how to detect the objects in the cargo of a vehicle in ACE 3.
I know how to add them, ( call ace_cargo_fnc_addCargoItem ),

but not how to detect them (get)


Thank you.

Share this post

Link to post
Share on other sites
19 hours ago, Grenadier ITF said:

I know how to add them

So you already have a starting point where you could search


19 hours ago, Grenadier ITF said:


The function is in ACE cargo. So we can go to the ACE github


Then go to the cargo module


And see what it does


Ah it calls loadItem, let's see what that does.


Oh it pushes the item into an array, that is stored on the vehicle with setVariable. That means we can also get that array!


Code even shows how to get it


We just need to replace the QGVAR macro which just adds prefix to variables.


End result:


_vehicle getVariable ["ace_cargo_loaded", []]


  • Like 3
  • Thanks 1

Share this post

Link to post
Share on other sites

Hi, guys  my problem i s similar. I try to make trigger as follow:
CONDITION: if box_01 is loaded to car_01;  //loaded via ACE3 command [object, vehicle] call ace_cargo_fnc_loadItem//

ON ACTIVATION: hint "The box is loaded into the car";

Could you give me an advice how how to correctly formulate this condition?

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now