Page MenuHomeFeedback Tracker

Error in spawnAI_module function
New, NormalPublic

Description

There is an error in \a3\modules_f_heli\misc\functions\modulespawnai\main.sqf where a wrong variable is referenced.
line 223:

			//update the global pool of groups
			if !(_group isEqualTo _groupsPrev) then
			{

_group should be _groups. Compare groups just spawned against the current reference of groups previously spawned held on the module.

If the manpower setting in the spawnAI module is low enough that nothing can be spawned, _group will be nil leading to script errors being shown.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
NA
Category
Scripting
Steps To Reproduce

Use the attached test mission.

The spawnAI module is set to only spawn 1 infantry "max Soldiers per group" and its manpower cap to 0.2 ( A blufor B_soldier_F's manpower rating is 0.4, ) so nothing can be spawned causing the error.

Change the manpower cap to > 0.4 and everything will work ok.

This is set up to specifically show the error but this can happen at any time especially when using armoured groups where their manpower rating is a lot larger ( e.g B_MBT_01_cannon_F is greater than 23 for the tank and its spawned crew ).

Event Timeline

Larrow created this task.Nov 12 2020, 4:47 PM
Larrow edited Steps To Reproduce. (Show Details)