Guest User

startDelivery.sqf

a guest
Mar 11th, 2014
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. //initialise who, what bay and what type
  2. _reciever = _this select 0;
  3. _deliverbay = _this select 1;
  4. _acceptsType = _this select 2;
  5.  
  6. //check for delivery every 30s
  7. while {true} do
  8. {
  9.  
  10. //put all accepted objects within 5m of the bay in an array
  11. _goodsInbound = nearestObjects[getMarkerPos _deliverbay, _acceptsType, 5];
  12.  
  13. //errorchecking hints
  14. _total = count _goodsInbound;
  15. _cntsmallInbound = "Fort_Crate_wood" countType _goodsInbound; //count number of items in array
  16. _cntmediumInbound = "CargoCont_Net1_H" countType _goodsInbound;
  17. _cntlargeInbound = "Land_Misc_Cargo1E_EP1" countType _goodsInbound;
  18.  
  19.  
  20.  
  21. hint format["Small: %1 Med: %2 Large: %3, Total: %4, Dude: %5 Worth: %6 ", _cntsmallInbound, _cntmediumInbound, _cntlargeInbound, _total, _reciever, _inboundWorth ];
  22.  
  23. //ignore below until the list is working - work out worth of total delivered goods
  24. //_inboundWorth = 0;
  25. //_unitWorth = {_x getVariable _goodsWorth;} forEach _goodsInbound;
  26. //{deleteVehicle _x;} forEach _goodsInbound;
  27.  
  28.  
  29.  
  30. sleep 30; //the 30seconds bit
  31.  
  32. };
Add Comment
Please, Sign In to add comment