Difference between revisions of "VN ms fnc aiHeliTransportAddAction"

From Savage Game Design Wiki
Jump to navigation Jump to search
vn>Unknown user
m (Generated by LM_exportFunctionsToWiki.sqf)
 
m (1 revision imported)
(No difference)

Revision as of 18:23, 5 January 2021

← back to Functions Introduced in S.O.G. Prairie Fire v1.00
Argument(s): n/a
Effect(s): unknown

Description

/*
    Author: Wyqer, veteran29
    Date: 2020-02-28

    Description:
        Add skip AI insertion travel hold action.

    Parameter(s):
        _vehicle - Vehicle to add action to [OBJECT]

    Returns:
        Action was added [BOOL]
*/

params [
    ["_vehicle", objNull, [objNull]]
];

if (_vehicle getVariable ["vn_aiHeliTransport_action", false]) exitWith {false};
_vehicle setVariable ["vn_aiHeliTransport_action", true];

private _group = _vehicle getVariable ["vn_aiHeliTransport_group", grpNull];

[
    _vehicle,
    localize "STR_VN_MISSIONS_ACTION_SKIP_TRAVEL",
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_takeOff1_ca.paa",    // Idle icon shown on screen
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_takeOff2_ca.paa",    // Progress icon shown on screen
    "_this in _target && {_target getVariable ['vn_aiHeliTransport_canSkip', false]}", // Condition for the action to be shown
    "_caller in _target && {_target getVariable ['vn_aiHeliTransport_canSkip', false]}", // Condition for the action to progress
    {},                            // Code executed when action starts
    {},                            // Code executed on every progress tick
    {
        params ["", "", "", "_arguments"];
        _arguments params ["_group"];
        [_group] remoteExec ["vn_ms_fnc_aiHeliTransportSkip", 2];
    },
    {},                                                  // Code executed on interrupted
    [_group],                                            // Arguments passed to the scripts as _this select 3
    3,                                                   // Action duration [s]
    -1000,                                               // Priority
    false,                                               // Remove on completion
    false,                                               // Show in unconscious state
    false                                                // Show on screen
] remoteExec ["BIS_fnc_holdActionAdd", 0, format ["vn_aiHeliTransport_action%1", _vehicle]];

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

Syntax

Syntax
[] call vn_ms_fnc_aiHeliTransportAddAction;
Return value
Nothing

Examples

Example 1
-