Difference between revisions of "VN ms fnc tracker tracksCreate"
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " {{Function" to "Category:TODO {{Function") |
Lou Montana (talk | contribs) m (Text replacement - "]]; |p1n=" to "]] |p1n=") |
||
| Line 49: | Line 49: | ||
</pre><small>''(Placeholder description extracted from the function header by '''LM_exportFunctionsToWiki.sqf''')''</small> | </pre><small>''(Placeholder description extracted from the function header by '''LM_exportFunctionsToWiki.sqf''')''</small> | ||
| − | |s= [] call [[vn_ms_fnc_tracker_tracksCreate]] | + | |s= [] call [[vn_ms_fnc_tracker_tracksCreate]] |
|p1n= | |p1n= | ||
Revision as of 21:14, 20 January 2021
| ← back to Functions | Introduced in S.O.G. Prairie Fire v1.00 by Wyqer, veteran29 |
|
Description
/*
Author: Wyqer, veteran29
Date: 2019-08-10
Description:
Creates tracks marker on unit position.
Parameter(s):
_unit - Unit leaving tracks [OBJECT, defaults to objNull]
Returns:
Created marker [STRING]
*/
params [
["_unit", objNull, [objNull]]
];
private _marker = createMarker [format ["vn_tracks_%1", time], _unit];
_marker setMarkerShape "ELLIPSE";
_marker setMarkerSize [VN_MS_TRACKS_A, VN_MS_TRACKS_B];
// base direction on velocity,
// this makes handling of the units going backwards or sideways easier
private _travelDir = (velocity _unit select 0) atan2 (velocity _unit select 1);
// atan2 is -180-180, normalise to 0-360
_travelDir = ((_travelDir % 360) + 360) % 360;
_marker setMarkerDir _travelDir;
// hide marker if not debug
#ifndef VN_DEBUG
_marker setMarkerAlpha 0;
#endif
_marker
(Placeholder description extracted from the function header by LM_exportFunctionsToWiki.sqf)
Syntax
- Syntax
- [] call vn_ms_fnc_tracker_tracksCreate
- Return value
- Nothing
Examples
- Example 1
-