VN_ms_fnc_tracker_preInit

From Savage Game Design Wiki
Revision as of 17:33, 23 February 2021 by Lou Montana (talk | contribs) (Text replacement - "[[vn_" to "[[VN_")
Jump to navigation Jump to search
← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Wyqer, veteran29
Argument(s): n/a
Effect(s): unknown

Description

/*
    Author: Wyqer, veteran29
    Date: 2019-08-10

    Description:
        Tracker system preInit.

    Parameter(s):
        NONE

    Returns:
        Function reached the end [BOOL]
*/

#ifdef VN_DEBUG
    vn_ms_tracker_debug = true;
#else
    vn_ms_tracker_debug = false;
#endif

vn_ms_tracker_audibleFireCache = createSimpleObject ["a3\weapons_f\empty.p3d", [-1337, -1337, 0], true];
"vn_ms_tracker_noisePos" addPublicVariableEventHandler {(_this select 1) call vn_ms_fnc_tracker_receiveNoise};

// all tracks left by players
vn_ms_tracks = [];
// last track position left by player
vn_ms_lastTrackLocal = [0,0,0];

// handle tracks creation
[missionNamespace, "vn_ms_tracksCreate", {
    params [["_unit", objNull, [objNull]]];

    private _track = _unit call vn_ms_fnc_tracker_tracksCreate;

    vn_ms_tracks pushBack _track;
    if (count vn_ms_tracks > VN_MS_TRACKS_LIMIT) then {
        deleteMarker (vn_ms_tracks deleteAt 0);
    };

    // Publish to clients if debug enabled
    if (missionNamespace getVariable ["vn_ms_debug", false]) then {
        publicVariable "vn_ms_tracks";
    };

}] call BIS_fnc_addScriptedEventHandler;

true
(Placeholder description extracted from the function header by LM_exportFunctionsToWiki.sqf)

Syntax

Syntax
[] call VN_ms_fnc_tracker_preInit
Return value
Nothing

Examples

Example 1
-