Collectibles

You can spawn collectible weapons in the playfield

You can also find a collectible with a specific id using game.findCollectible(id), which returns an object represents the matched collectible or null (if no collectibles are matching the provided id)

Creation

Here is an example:

> game.addCollectible({code:10,x:0,y:0});
> █

This will add a new collectible pack of rockets to coordinates (0;0)

Here is the list of supported codes:

(Note: Server will respond with Incorrect data when at least one input property value is improper)

CodeDescription
104 rockets pack
112 missiles pack
121 torpedo
208 light mines pack
214 heavy mines pack
40Mining pod
41Attack pod
42Defense pod
90Energy refill
91Shield refill

Limits

You can only have 50 active collectibles (including collectibles generated by the game mode) at any time in your game

The server will respond with Too many Collectibles for each collectible passing the limit

Accessing

For each collectible object in game.collectibles, You have access to the same properties as the available ones when you add collectibles, plus some additional properties:

OptionDescription
gamePoints to the global game object
ida unique identifier for the collectible