This tutorial will show you how to give weapons and equipment items to AI entities and to the player. You will learn how to carry the inventory of the player from one mission to another, as well as giving the player individual items.
Open the Equipment Pack window using in the Mission menu.
Select one of the Equipment Packs using the drop-down menu.
Or create a new pack by clicking on the Add button
Add Weapons and Equipment items to the Equipment list using the << or >> buttons.
Enemies can be set up to have unlimited ammo so you don’t need to specify the amount of bullets.
You can also access the equipment pack editor by clicking EquipmentPack in the properties of a character with a weapon.
The flowgraph equipment packs from the last mission can be reused by setting these flowgraph nodes: (Note: to test a mission, or to give the player a bunch of weapons at level start use the ADDEQUIPPACK node and connect it to the start node.)
To give the player individual weapons and items, the Inventory flow graph nodes should be used. Right click in the flow graph window:
AddItem: Adds a item/weapon to the players inventory
HasItem: Checks if the player has a specific item
ItemSelected: Checks if the player has selected a specific item
RemoveAllItems: Removes all items from the players inventory
RemoveItem: Removes a specific item from the players inventory
SelectItem: Selects a specific item in the players inventory if available
Use the Add Node/Misc/Start node to give the player a GaussRifle at level start:
When the player starts the mission he has the GaussRifle right at the beginning:
Some things to experiment with:
Play with your equipment packs to give the player an interesting setup at the start of your level, or to create a unique and varied feel to your enemy types.
If you’re working with multiple level setups, it’s a good idea for testing to give the player appropriate weapons. However, when streaming between levels, it’s a good idea to make sure you don’t give your player new weapons for free, or to take any away.