Page MenuHomeFeedback Tracker

JoinSilent deletes empty group
Closed, ResolvedPublic

Description

Emptying a group from units with joinSilent command causes the empty group to be deleted. Even when the isGroupDeletedWhenEmpty would be false

Details

Severity
Major
Resolution
Not A Bug
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Start empty mission with nothing but player object in it.

Then run this from the console:

_testGroup = createGroup [west,false];
_unit = _testGroup createUnit ["B_medic_F", [0,0,0], [], 0, "NONE"];

systemchat format["Should delete: %1 ", isGroupDeletedWhenEmpty _testGroup];

[_unit] joinSilent (group player);

systemchat format["Group: %1 - %2 ", _testGroup, units _testGroup];

The last systemchat prints <NULL-group>

So the group has been deleted by joinSilent despite the false parameter in createGroup

Additional Information

join command may behave the same way

Event Timeline

gc8 created this task.Oct 24 2021, 7:59 PM

from createGroup

If set to true, forces a group to get deleted when empty - it does not prevent its deletion by other commands when set to false. Deletion may take up to a minute after the last unit is removed.

so as designed

You can force group deletion when empty but not force group non deletion when empty

BIS_fnc_KK closed this task as Resolved.Oct 25 2021, 6:02 PM
BIS_fnc_KK changed Resolution from Open to Not A Bug.
gc8 added a comment.Oct 25 2021, 6:09 PM

If you empty the group from units with deleteVehicle command the group does not become null, but if you do it with joinSilent the group does become null. So there is this inconsistency with behaviors between those two commands. So I thought it might be a bug

Tested your example with join and joinSilent, the result is identical, group gets deleted

gc8 added a comment.Oct 27 2021, 9:51 AM

Tested your example with join and joinSilent, the result is identical, group gets deleted

I meant joinSilent vs deleteVehicle

deleteVehicle is not the same as join or joinSilent, therefore it is expected there will be different behaviour. As I mentioned above, this is how it has been designed, and looks like it works as designed. BIKI goes in length about how false is not going to stop group from deletion.