Difference between revisions of "VN ms fnc aiHeliTransportAddAction"

From Savage Game Design Wiki
Jump to navigation Jump to search
m (1 revision imported)
(Page filling)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
 
{{Function
 
{{Function
  
 
|v= 1.00
 
|v= 1.00
  
|a= Wyqer, veteran29
+
|author= Wyqer, veteran29
  
|e=
+
|a= global
 +
 
 +
|e= global
  
 
|g1= general
 
|g1= general
  
|d= <pre>/*
+
|d= Add skip AI insertion travel hold action.
    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
 
</pre><small>''(Placeholder description extracted from the function header by '''LM_exportFunctionsToWiki.sqf''')''</small>
 
  
|s= [] call [[vn_ms_fnc_aiHeliTransportAddAction]];
+
|s= [vehicle] call [[VN_ms_fnc_aiHeliTransportAddAction]]
  
|p1n=
+
|p1n= vehicle
|p1t=
+
|p1t= object
|p1d=
+
|p1d= the vehicle to skip transport
 
|p1v=
 
|p1v=
  
Line 71: Line 25:
 
|p2v=
 
|p2v=
  
|r1t=
+
|r1t= boolean
|r1d=
+
|r1d= function's success
  
|x1= <code>-</code>
+
|x1= <code>[sogChopper] call [[VN_ms_fnc_aiHeliTransportAddAction]];</code>
 
}}
 
}}

Latest revision as of 17:10, 22 February 2021

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

Description

Add skip AI insertion travel hold action.

Syntax

Syntax
[vehicle] call VN_ms_fnc_aiHeliTransportAddAction
Parameters
vehicle: Object - the vehicle to skip transport
Return value
Boolean - function's success

Examples

Example 1
[sogChopper] call VN_ms_fnc_aiHeliTransportAddAction;