addweaponglobalcargo to near object

Rossymond

Moderator
Staff member
Hi guys, been messing about with this for a while now but my skills are letting me down.

Trying to add a weapon/item to a nearby box which is defined to reammobox class when triggered.

So I currently have the script working in that it triggers, defines an output array etc.

Everytime I try to add the output of the script to a nearby object, it fails on "cannot create non-ai vehicle"

I'm currently using this:

Code:
        _create = _lootcreate;
        _qty = 1;
        _box = /// This is my issue line I think
        _box addWeaponCargoGlobal [_create,_qty];

So my issue is defining the box I believe, I tried _box = nearobject "itemclass"; but no effect.

Any help would be great :)
 
Back
Top