deleteGroupWhenEmpty: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game version" to "|Game version=")
Line 3: Line 3:


| arma3 |Game name=
| arma3 |Game name=
|1.68|Game version=
|1.68|Game version=
|arg= global|=
 
|arg= global|Multiplayer Arguments=
 
|eff= global |Multiplayer Effects=
|eff= global |Multiplayer Effects=
____________________________________________________________________________________________
____________________________________________________________________________________________


| Marks given group for auto-deletion when group is empty. [[true]] will mark the group for auto-deletion, however [[false]] will only unmark the group that was marked previously. There are other engine group auto-deletion mechanisms in place, which are not affected by this.<br><br>
| Marks given group for auto-deletion when group is empty. [[true]] will mark the group for auto-deletion, however [[false]] will only unmark the group that was marked previously. Other engine group auto-deletion mechanisms in place are not affected by this.
'''NOTE:''' It might take up to a minute for the groups marked for auto-deletion when empty to get deleted when they become empty.|=
 
{{Informative | It might take up to a minute for the groups marked for auto-deletion when empty to get deleted when they become empty.}} |Description=
____________________________________________________________________________________________
____________________________________________________________________________________________


|  group '''deleteGroupWhenEmpty''' delete |SYNTAX=
|  group [[deleteGroupWhenEmpty]] delete |SYNTAX=


|p1= group: [[Group]] |PARAMETER1=
|p1= group: [[Group]] |PARAMETER1=
|p2= delete: [[Boolean]] - [[true]] to mark for auto-deletion|PARAMETER1=
 
|p2= delete: [[Boolean]] - [[true]] to mark for auto-deletion |PARAMETER2=


| [[Nothing]] |RETURNVALUE=
| [[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
Line 25: Line 29:


| [[deleteGroup]], [[isGroupDeletedWhenEmpty]], [[createGroup]], [[group]], [[setGroupId]], [[groupID]], [[units]], [[groupFromNetId]], [[netId]], [[leader]], [[selectLeader]], [[join]], [[createCenter]], [[createUnit]], [[createVehicle]], [[Side]] |SEEALSO=
| [[deleteGroup]], [[isGroupDeletedWhenEmpty]], [[createGroup]], [[group]], [[setGroupId]], [[groupID]], [[units]], [[groupFromNetId]], [[netId]], [[leader]], [[selectLeader]], [[join]], [[createCenter]], [[createUnit]], [[createVehicle]], [[Side]] |SEEALSO=
}}
}}


Line 31: Line 34:
<dl class="command_description">
<dl class="command_description">


</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on February 8, 2018 - 22:01 (UTC)</dd>
<dd class="notedate">Posted on February 8, 2018 - 22:01 (UTC)</dd>
<dt class="note">[[User:Wyqer|Wyqer]]</dt>
<dt class="note">[[User:Wyqer|Wyqer]]</dt>
Line 44: Line 39:
It seems, that the argument has to be local (like for deleteGroup).
It seems, that the argument has to be local (like for deleteGroup).
So if you run it on a server and the group isn't local to the server this wouldn't work:
So if you run it on a server and the group isn't local to the server this wouldn't work:
<code>_group deleteGroupWhenEmpty true;</code>
<code>_group [[deleteGroupWhenEmpty]] [[true]];</code>
But this would work:
But this would work:
<code>if (local _group) then {
<code>[[if]] ([[local]] _group) [[then]] {
     _group deleteGroupWhenEmpty true;
     _group [[deleteGroupWhenEmpty]] [[true]];
} else {
} [[else]] {
     [_group, true] remoteExec ["deleteGroupWhenEmpty", groupOwner _group];
     [_group, [[true]]] [[remoteExec]] ["[[deleteGroupWhenEmpty]]", [[groupOwner]] _group];
};</code>
};</code>
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->
 
<h3 style="display:none">Bottom Section</h3>
 
 
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]

Revision as of 16:31, 11 September 2019

Hover & click on the images for description

Description

Description:
Marks given group for auto-deletion when group is empty. true will mark the group for auto-deletion, however false will only unmark the group that was marked previously. Other engine group auto-deletion mechanisms in place are not affected by this.
It might take up to a minute for the groups marked for auto-deletion when empty to get deleted when they become empty.
Groups:
Uncategorised

Syntax

Syntax:
group deleteGroupWhenEmpty delete
Parameters:
group: Group
delete: Boolean - true to mark for auto-deletion
Return Value:
Nothing

Examples

Example 1:
_group deleteGroupWhenEmpty true;

Additional Information

See also:
deleteGroupisGroupDeletedWhenEmptycreateGroupgroupsetGroupIdgroupIDunitsgroupFromNetIdnetIdleaderselectLeaderjoincreateCentercreateUnitcreateVehicleSide

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Posted on February 8, 2018 - 22:01 (UTC)
Wyqer
It seems, that the argument has to be local (like for deleteGroup). So if you run it on a server and the group isn't local to the server this wouldn't work: _group deleteGroupWhenEmpty true; But this would work: if (local _group) then { _group deleteGroupWhenEmpty true; } else { [_group, true] remoteExec ["deleteGroupWhenEmpty", groupOwner _group]; };

Bottom Section