VN_ms_fnc_aiSetSkill

From Savage Game Design Wiki
Revision as of 19:19, 5 January 2021 by Lou Montana (talk | contribs) (Text replacement - " |a= " to " |author= ")
Jump to navigation Jump to search
← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Wyqer, veteran29, Spoffy
Argument(s): n/a
Effect(s): unknown

Description

/*
    File: fn_aiSetSkill.sqf
    Author: Wyqer, veteran29, Spoffy
    Date: 2020-05-29
    Last Update: 2020-12-17
    Public: Yes

    Description:
        Configure unit skills. These are tuned for infantry jungle-fighting, and may not work as well on vehicle crews.

    Parameter(s):
        _unit - Unit to set skills for [OBJECT, defaults to objNull]

    Returns:
        Skills were set [BOOL]

    Example(s):
        [bob] call vn_ms_fnc_aiSetSkill
*/
params [
    ["_unit", objNull, [objNull]]
];

if (isMultiplayerSolo || {vn_difficulty == DIFFICULTY_EASY}) then {
    _unit setSkill 0.6;
    _unit setSkill ["general", 0.6];
    _unit setSkill ["aimingSpeed", 0.35];
    _unit setSkill ["aimingShake", 0.5];
    _unit setSkill ["commanding", 0.6];
    _unit setSkill ["courage", 0.6];
    _unit setSkill ["reloadSpeed", 0.6];
    _unit setSkill ["spotDistance", 0.4];
    _unit setSkill ["spotTime", 0.3];
    _unit setSkill ["aimingAccuracy", 0.15];
} else {
    _unit setSkill 1;
    _unit setSkill ["general", 1];
    _unit setSkill ["aimingSpeed", 0.75];
    _unit setSkill ["aimingShake", 0.9];
    _unit setSkill ["commanding", 1];
    _unit setSkill ["courage", 1];
    _unit setSkill ["reloadSpeed", 1];
    _unit setSkill ["spotDistance", 0.5];
    _unit setSkill ["spotTime", 0.7];
    _unit setSkill ["aimingAccuracy", 0.2];
};

_unit setVariable ["vn_ms_skill", true];

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

Syntax

Syntax
[] call vn_ms_fnc_aiSetSkill;
Return value
Nothing

Examples

Example 1
-