ACE3/addons/maptools/functions/fnc_calculateMapScale.sqf
2015-04-17 18:13:09 -05:00

21 lines
449 B
Plaintext

/*
* Author: esteldunedain
* Returns the equivalent of 100m in screen coordinates
*
* Arguments:
* None
*
* Return value:
* No
*
* Public: No
*/
#include "script_component.hpp"
private ["_screenOffset", "_pos"];
_pos = ((finddisplay 12) displayctrl 51) ctrlMapScreenToWorld [0.5, 0.5];
_screenOffset = ((finddisplay 12) displayctrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)];
(_screenOffset select 0) - 0.5