Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Comment:
Migrated to Confluence 5.3
Excerpt |
---|
Add a game object to a group... |
Syntax
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
groupAdd(group, gameObj); |
Parameters
Parameter | Type | Mandatory | Description | Game version |
---|---|---|---|---|
group | Number | The unique ID of the group you want to add to. If the group ID doesn't exist, a group will be created automatically. You can determine the next available group from You can also use newGroup() to create a new group and get it's ID. | 3.2 | |
gameObj | Game object | A valid droid, structure or feature. If it's already in a different group, it will be transferred in to this group. | 3.2 |
Return value
Value | Type | Description | Game version |
---|---|---|---|
undefined | Undefined | The object was added to the group (or was already in it) | 3.2 |
<error> | Error | Invalid parameters. | 3.2 |
Notes
Read important notes about changes to groups in Warzone 3.2.
Example
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
var annoyances = newGroup(); function eventAttacked(victim, attacker) { groupAdd(annoyances, attacker); } |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Requires:
Earlier versions:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
| ||||
Div | ||||
|
Include Page | ||||
---|---|---|---|---|
|