PickupBackpack() is used to add all of the items in the backpack to a player's inventory. But PickupBackpack() was probably created to replace a more complicated system using the NthBackpack verbs. Should you want to use those obsolete verbs, or just learn the system, here's a chart showing how they work:
Item Storage In A Backpack | |||
---|---|---|---|
Item Number | Bin | Amount | This would be: |
1 | 2 | 1 | Bryar. |
2 | 7 | 1 | Rail Detonator. |
3 | 10 | 1 | Lightsaber. |
4 | 11 | 50 | Energy ammo. |
5 | 15 | 6 | Rail charges. |
The number of items in a backpack is returned by NumBackpackItems().
Once you know how many items are in a backpack, how do you find out what they are?
NthBackpackBin() will return the bin ID of an item. And once you have the
bin number, you can find out how much is in the bin with NthBackpackValue().
This verb returns the amount of the given item.
Team System
When teamplay is used in a normal multiplayer game, four teams can be used: red, yellow, blue, and green.
When teamplay is not checked, all players will have a team of 0 which cannot be changed. Remember that
whether teamplay is on or not, players always have a team.
Sync Verbs
The Sync Verbs are used to synchronize information on one computer with the other computers
in a multiplayer game. This is mostly done for joining players to sync effects created before
they joined.
Once a Sync Verb has been run in a cog, it will run automatically when another player joins to sync
the effect again for another joining player.