deleteGroup: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Feature arma3|" to "{{Feature|arma3|")
m (Some wiki formatting)
 
(40 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma1 |Game name=
|game1= ofpe
|version1= 1.00


|1.00|Game version=
|game2= arma1
|version2= 1.00


|gr1= Groups |GROUP1=
|game3= arma2
|arg= local |Multiplayer Arguments=
|version3= 1.00


|eff= global |Multiplayer Effects=
|game4= arma2oa
____________________________________________________________________________________________
|version4= 1.50


| Destroys the given group. <u>Group must be empty and local to the machine executing command</u>. <br><br>
|game5= tkoh
|version5= 1.00


{{Informative |In Arma 3 you can find out locality of the group with [[local]] command, unlike with previous games. However [[owner]] and [[setOwner]] dont work with groups anywhere. The group will always be local to the client that created it, until the client disconnects, then the group becomes local to the server. So if you need to delete a group, delete all members first then execute [[deleteGroup]] where is it [[local]]. }}<br>
|game6= arma3
|version6= 0.50


{{Feature|arma3|In Arma 3 when last unit leaves a group, the group gets [[Talk:deleteGroup#group_auto_becoming_null|auto deleted]]. Manually deleting all units from a group however, does not auto delete the empty group. To force the group to get auto-deleted when empty use [[deleteGroupWhenEmpty]]}}|DESCRIPTION=
|gr1= Groups
____________________________________________________________________________________________
|arg= local


| '''deleteGroup''' group|SYNTAX=
|eff= global


|p1= group: [[Group]] |PARAMETER1=
|descr= Destroys the given group - the group must be empty and [[Multiplayer Scripting#Locality|local]] to the machine executing this command.


| [[Nothing]] |RETURNVALUE=
{{Feature|informative|In {{arma3}} you can find out locality of the group with [[local]] command, unlike with previous games. However [[owner]] and [[setOwner]] don't work with groups anywhere. The group will always be local to the client that created it, until the client disconnects, then the group becomes local to the server. So if you need to delete a group, delete all members first then execute [[deleteGroup]] where is it [[local]].}}
____________________________________________________________________________________________
 
|x1= <code>'''deleteGroup''' _groupname</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[deleteGroupWhenEmpty]], [[isGroupDeletedWhenEmpty]], [[createGroup]], [[units]], [[group]], [[groupFromNetId]] |SEEALSO=
{{Feature|arma3|In {{arma3}} when the last unit leaves a group, the group gets automatically deleted. Manually deleting all units from a group, however, does '''not''' automatically delete the empty group. To force the group to get auto-deleted when empty, use [[deleteGroupWhenEmpty]].}}


}}
|s1= [[deleteGroup]] group
 
|p1= group: [[Group]]


<h3 style="display:none">Notes</h3>
|r1= [[Nothing]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on December 17, 2006 - 00:34
|x1= <sqf>deleteGroup _group;</sqf>
<dt class="note">[[User:ColonelSandersLite|ColonelSandersLite]]<dd class="note"><br>
The deleteGroup Command does not work when there are living members of in the group.  It doesn't error, it simply doesn't do anything.<br>


<dd class="notedate">Posted on 07:50, 10 July 2007 (CEST)
|x2= <sqf>[_group] remoteExec ["deleteGroup", groupOwner _group]; // server only</sqf>
<dt class="note">[[User:5133p39|5133p39]]<dd class="note">Living or not doesn't matter - you can't delete the group while it contains any units - even dead ones. It takes few seconds until a dead unit is automatically removed from its group.


<dd class="notedate">Posted on September 12, 2013 - 03:54
|seealso= [[deleteGroupWhenEmpty]] [[isGroupDeletedWhenEmpty]] [[createGroup]] [[units]] [[group]] [[groupFromNetId]]
<dt class="note">[[User:LongEnoughName|LongEnoughName]]<dd class="note">deleteGroup will only delete local groups even if called by server. Say we have a situation where client creates a group and puts a unit there and later unit dies\gets deleted, server will not be able to delete that empty group until client leaves the game and group ownership switches to server
}}


<!-- Note Section END -->
{{Note
</dl>
|user= ColonelSandersLite
|timestamp= 20061217003400
|text= The deleteGroup Command does not work when there are living members of in the group.  It doesn't error, it simply doesn't do anything.
}}


<h3 style="display:none">Bottom Section</h3>
{{Note
|user= 5133p39
|timestamp= 20070710075000
|text= Living or not doesn't matter - you can't delete the group while it contains any units - even dead ones. It takes few seconds until a dead unit is automatically removed from its group.
}}


[[Category:Scripting Commands|DELETEGROUP]]
{{Note
[[Category:Scripting Commands OFP Elite |DELETEGROUP]]
|user= LongEnoughName
[[Category:Scripting Commands Armed Assault|DELETEGROUP]]
|timestamp= 20130912035400
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
|text= deleteGroup will only delete local groups even if called by server.
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
Say we have a situation where client creates a group and puts a unit there and later unit dies/gets deleted, server will not be able to delete that empty group until client leaves the game and group ownership switches to server.
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Command_Group:_Object_Manipulation|{{uc:{{PAGENAME}}}}]]

Latest revision as of 00:40, 31 August 2022

Hover & click on the images for description

Description

Description:
Destroys the given group - the group must be empty and local to the machine executing this command.
In Arma 3 you can find out locality of the group with local command, unlike with previous games. However owner and setOwner don't work with groups anywhere. The group will always be local to the client that created it, until the client disconnects, then the group becomes local to the server. So if you need to delete a group, delete all members first then execute deleteGroup where is it local.
Arma 3
In Arma 3 when the last unit leaves a group, the group gets automatically deleted. Manually deleting all units from a group, however, does not automatically delete the empty group. To force the group to get auto-deleted when empty, use deleteGroupWhenEmpty.
Groups:
Groups

Syntax

Syntax:
deleteGroup group
Parameters:
group: Group
Return Value:
Nothing

Examples

Example 1:
deleteGroup _group;
Example 2:
[_group] remoteExec ["deleteGroup", groupOwner _group]; // server only

Additional Information

See also:
deleteGroupWhenEmpty isGroupDeletedWhenEmpty createGroup units group groupFromNetId

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
ColonelSandersLite - c
Posted on Dec 17, 2006 - 00:34 (UTC)
The deleteGroup Command does not work when there are living members of in the group. It doesn't error, it simply doesn't do anything.
5133p39 - c
Posted on Jul 10, 2007 - 07:50 (UTC)
Living or not doesn't matter - you can't delete the group while it contains any units - even dead ones. It takes few seconds until a dead unit is automatically removed from its group.
LongEnoughName - c
Posted on Sep 12, 2013 - 03:54 (UTC)
deleteGroup will only delete local groups even if called by server. Say we have a situation where client creates a group and puts a unit there and later unit dies/gets deleted, server will not be able to delete that empty group until client leaves the game and group ownership switches to server.