createUnit (array) always creates AI units with skill 1, which is not a sane default.
I suggest it should use editor default 0.5 or use a random value between 0.1 and 1. {F21377}
createUnit (array) always creates AI units with skill 1, which is not a sane default.
I suggest it should use editor default 0.5 or use a random value between 0.1 and 1. {F21377}
Run attached repro mission; skill is hint'ed.
"I suggest it should use editor default 0.5 or use a random value between 0.1 and 1."
I think it is more rational to default to editor. A random value can lead to confusion imo.
Or apply another parameter for mission designers so it will be set while calling the function.
The parameter is difficulty setting. AI skill should be set according to difficulty in configure -> game -> difficulty -> AI unit skill
It is all there no need to reinvent the wheel.
not sure if still valid (not reason to think otherwise)
"Note: Currently, the precision is derived from a skill as follows:
precision = skill*1.8-0.8
The result is clamped into 0.1 ... 1.0 range.
(The "skill" here is the combined skill which is a result of a unit skill as given in the editor and the skill given in the difficulty settings.)
Precision affects AI abilities aimingAccuracy and aimingShake, all other abililities (including aimingSpeed) are affected by a skill (see http://community.bistudio.com/wiki/setSkill_array)" - Suma
2y ago (here - http://dev-heaven.net/issues/27851)
basically meaning we should consider the value defined by the player via difficulty menu different from the one set for a mission in editor. I think it is reasonable for the mission editor dinamically spawning a unit to assume an editor skill which will likewise be further modified by player settings.
(in any case Bohemia as revealed in the forum they are addressing this issue supposedly in a wider form)
createUnit function now spawns unit with default 0.5 skill (used in BIS_fnc_spawnGroup)
Mass-closing resolved issues updated only last year - assuming fixed correctly.
Cheers!