2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-03-24 04:18:00 +00:00
|
|
|
* Author: esteldunedain
|
2024-02-03 18:48:21 +00:00
|
|
|
* Returns the equivalent of 100m in screen coordinates.
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
2015-04-07 20:01:44 +00:00
|
|
|
* Arguments:
|
2015-01-11 16:42:31 +00:00
|
|
|
* None
|
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Return Value:
|
2024-02-03 18:48:21 +00:00
|
|
|
* Map scale <NUMBER>
|
2017-06-08 13:31:51 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2024-02-03 18:48:21 +00:00
|
|
|
* call ace_maptools_fnc_calculateMapScale
|
2015-04-07 20:01:44 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2015-01-15 21:50:48 +00:00
|
|
|
|
2024-02-03 18:48:21 +00:00
|
|
|
private _mapCtrl = (findDisplay 12) displayCtrl 51;
|
|
|
|
private _pos = _mapCtrl ctrlMapScreenToWorld [0.5, 0.5];
|
|
|
|
private _screenOffset = _mapCtrl posWorldToScreen (_pos vectorAdd [100, 0]);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
(_screenOffset select 0) - 0.5
|