Difference between revisions of "VN ms fnc tracker tracksCreate"

From Savage Game Design Wiki
Jump to navigation Jump to search
m (Text replacement - "[[vn_" to "[[VN_")
(Page filling)
 
Line 1: Line 1:
[[Category:TODO]]
 
 
{{Function
 
{{Function
  
Line 6: Line 5:
 
|author= Wyqer, veteran29
 
|author= Wyqer, veteran29
  
|a=
+
|a= global
  
|e=
+
|e= global
  
 
|g1= tracker
 
|g1= tracker
  
|d= <pre>/*
+
|d= Creates tracks marker on unit position.
    Author: Wyqer, veteran29
 
    Date: 2019-08-10
 
  
    Description:
+
|s= [unit] call [[VN_ms_fnc_tracker_tracksCreate]]
        Creates tracks marker on unit position.
 
  
    Parameter(s):
+
|p1n= unit
        _unit - Unit leaving tracks [OBJECT, defaults to objNull]
+
|p1t= object
 
+
|p1d= unit leaving tracks
    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
 
</pre><small>''(Placeholder description extracted from the function header by '''LM_exportFunctionsToWiki.sqf''')''</small>
 
 
 
|s= [] call [[VN_ms_fnc_tracker_tracksCreate]]
 
 
 
|p1n=
 
|p1t=
 
|p1d=
 
 
|p1v=
 
|p1v=
  
Line 61: Line 25:
 
|p2v=
 
|p2v=
  
|r1t=
+
|r1t= string
|r1d=
+
|r1d= created marker, format "vn_tracks_''number''"
  
|x1= <code>-</code>
+
|x1= <code>[player] call [[VN_ms_fnc_tracker_tracksCreate]];</code>
 
}}
 
}}

Latest revision as of 16:27, 26 February 2021

← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Wyqer, veteran29
Argument(s): global
Effect(s): global

Description

Creates tracks marker on unit position.

Syntax

Syntax
[unit] call VN_ms_fnc_tracker_tracksCreate
Parameters
unit: Object - unit leaving tracks
Return value
String - created marker, format "vn_tracks_number"

Examples

Example 1
[player] call VN_ms_fnc_tracker_tracksCreate;