Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

Triggered when a game object leaves a group...

 

Syntax

Code Block
themeRDark
languagejavascript
linenumberstrue
eventGroupLoss(gameObject, groupID, groupSize)

Parameters

ParameterTypeNotesGame Version
gameObjectGame object

The object that left the group.

Note that in WZ 3.2+, any type of game object can be added to a group.

3.2
groupIDNumberThe ID of the group3.2
groupSizeNumberThe size of the group after the object was removed from the group.3.2

Notes

An object can be removed from a group in three four ways:

  • The object is moved to another group
  • The object gets destroyed – eventDestroyed() will be triggered after eventGroupLoss()
  • The object is transferred to another player (either by Nexus Link or donateObject()) – (question) not sure of event order or .player val
  • The object is moved to another groupdestroyed
  • The object is transferred to an ally
  • The object is assimilated by Nexus Link

The sequence of events is as shown below:

Image Added

When an object is transferred or assimilated, the .player property of the object sent to eventGroupLoss() will be the original player, whereas the .player property of the object sent to eventObjectTransfer() will be the new owner.

When droids are assimilated via Nexus Link, eventDestroyed() is also triggered, however this is considered to be a bug as the object hasn't actually been destroyed.

Div
classsuggest box

Thanks to NoQ for providing detailed information on event sequencing.

Div
classbox
Availability
Status
colourYellow
title3.2+

Requires:

  • Warzone 3.2 or above
Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Include Page
.jslinks-groups
.jslinks-groups