aeroson

Untitled

Jun 15th, 2013
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1.  
  2.  
  3. objects = [];
  4. times = [];
  5.  
  6. draw3d = {
  7.  
  8. _start = [ [player modelToWorld [0,0,0], player modelToWorld (player selectionposition "RightShoulder")] call BIS_fnc_vectorDiff, visiblePosition player] call BIS_fnc_vectorAdd;;
  9.  
  10. _maxDist = 30;
  11. {
  12. _dist = _start distance _x;
  13. _alpha = 1 - _dist/_maxDist;
  14. if(!(_x in objects)) then {
  15. objects set[count objects, _x];
  16. times set[count times, time];
  17. };
  18. _text = str(round((time-(times select (objects find _x)))*10.0)/10.0);
  19. drawIcon3D ["a3\ui_f\data\IGUI\RscingameUI\RscUnitInfoAirRTDFull\ico_cpt_park_on_ca.paa", [1,0,0,_alpha], visiblePosition _x, 1, 1, 0, _text, 1, 0.03, "default"];
  20. drawLine3D [visiblePosition _x, _start, [1,0,0,_alpha]];
  21. } forEach (_start nearObjects ["grenade",_maxDist]);
  22.  
  23. _maxDist = 20;
  24. {
  25. _dist = _start distance _x;
  26. _pos = [ [_x modelToWorld [0,0,0], _x modelToWorld (_x selectionposition "RightShoulder")] call BIS_fnc_vectorDiff, visiblePosition _x] call BIS_fnc_vectorAdd;
  27. drawIcon3D ["a3\ui_f\data\IGUI\Cfg\TacticalDisplay\targetairtexture_gs.paa", [0.1,0.6,1,0.5], _pos, 0.8, .8, 0, "", 1, 0.03, "default"];
  28. if(_dist<_maxDist) then {
  29. _alpha = 1 - _dist/_maxDist;
  30. drawLine3D [_pos, _start, [0,0.1,1,_alpha]];
  31. };
  32. } forEach allUnits;
  33. };
  34.  
  35. [] call draw3d;
  36.  
  37. a=addMissionEventHandler["draw3d",{
  38. [] call draw3d;
  39. }];
  40.  
  41.  
  42.  
  43. // triangle a3\ui_f\data\IGUI\Cfg\TacticalDisplay\targetairtexture_gs.paa
  44. // square a3\ui_f\data\IGUI\Cfg\TacticalDisplay\targettexture_gs.paa
  45. // heal a3\ui_f\data\IGUI\Cfg\Actions\heal_ca.paa
  46. // hexagon a3\ui_f\data\IGUI\Cfg\Cursors\select_ca.paa
Advertisement
Add Comment
Please, Sign In to add comment