After completing this tutorial, you will be able to give weapons and equipment items to AI entities and to the player. You will also be able to carry the inventory of the player from one mission to another, as well as give the player specific items at the start of a level.
On the Game menu, click Edit Equipment-Packs:
Using the drop-down list, select one of the Equipment-Packs:
Or, create a new pack by clicking Add:
Add and remove weapons and equipment items to and from the lists by using the << and >> buttons.
You can also access the equipment pack editor by clicking EquipmentPack in the properties of a character with a weapon.
Enemies can be configured to have an unlimited amount of ammunition so that you don't need to specify the number of bullets.
During some point in the game you may want to load a new level, but also carry over the players weapons and items over to the next level.
In the following picture we have a setup where on the completion or failure of MissionObjective5 we will save the player's inventory, fade out the screen and then trigger the next level.
Then once the next level has been loaded, we will restore the saved inventory, fade in and then activate the mission MissionObjective1.
To give the player individual weapons and items, the Inventory Flow Graph nodes should be used.
Right-click the Flow Graph window and find the Inventory nodes:
Specify which ammo type to give and also the amount.
Specify an equipment pack to give. Opens up the Equipment Pack dialog to chose from there.
Add a specific item to the players inventory.
Check for a specific ammo type and amount in the players inventory.
Check for a specific item in the players inventory.
Trigger the player to holster / un-holster their weapon.
Check for specific items in the players hands.
Remove all ammunition from the specified entities inventory.
Remove all inventory items (including weapons) from the specified entities inventory.
Remove a specific item from the specified entities inventory.
Use this to load up a previously saved player inventory.
For an item in the players inventory to be the selected weapon.
Specify an ammo type and set an exact amount.
Same as the SetAmmo node.
Save the players inventory state to be called on later with the RestorePlayerInventory node.
Use the Add Node/Misc/Start node to give the player a SCAR at the beginning of the level:
When the player starts the mission, he will have the SCAR right at the beginning.
Some things to experiment with:
This tutorial shows users how to set up equipment packs from within Sandbox.