//initialise who, what bay and what type _reciever = _this select 0; _deliverbay = _this select 1; _acceptsType = _this select 2; //check for delivery every 30s while {true} do { //put all accepted objects within 5m of the bay in an array _goodsInbound = nearestObjects[getMarkerPos _deliverbay, _acceptsType, 5]; //errorchecking hints _total = count _goodsInbound; _cntsmallInbound = "Fort_Crate_wood" countType _goodsInbound; //count number of items in array _cntmediumInbound = "CargoCont_Net1_H" countType _goodsInbound; _cntlargeInbound = "Land_Misc_Cargo1E_EP1" countType _goodsInbound; hint format["Small: %1 Med: %2 Large: %3, Total: %4, Dude: %5 Worth: %6 ", _cntsmallInbound, _cntmediumInbound, _cntlargeInbound, _total, _reciever, _inboundWorth ]; //ignore below until the list is working - work out worth of total delivered goods //_inboundWorth = 0; //_unitWorth = {_x getVariable _goodsWorth;} forEach _goodsInbound; //{deleteVehicle _x;} forEach _goodsInbound; sleep 30; //the 30seconds bit };