Page MenuHomeFeedback Tracker

Bug in BIS_fnc_spawnGroup
New, NormalPublic

Description

The randomisation controls of BIS_fnc_spawnGroup are not correctly respected, see this line:

if ((random 1) > _chance) then {_skip = true};

If the minimum number of units parameter is exceeded then the function performs this check against the spawn chance parameter to determine whether to spawn the rest of a groups units. However if the spawn chance was 0 (for example if someone wanted to spawn a cfgGroups group and limit the amount of units in the group) there would still be a slim chance that further units are spawned with this condition (since random 1 could return 0).

The correct condition would be (random 1) < (1 - _chance) if the surrounding code was to remain the same.

Details

Severity
Trivial
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
Scripting

Event Timeline

SilentSpike updated the task description. (Show Details)