Updating the Equip section
This tutorial updates the previous one, “Profiles: weapons, aiming and drawing”, for version 1.8. The Body Layer and Aim sections don’t change: everything happens in the Equip section, the one that plays the animations to draw and sheathe the weapon.
The new Weapon row
A new row has appeared in Equip: Weapon. It sets up the weapon’s mesh directly from the Data Asset. Before, this was done in the character Blueprint: you had to add the mesh there, define its sockets, then call Attach Weapon to Socket or Show Weapon to draw and sheathe.
This is no longer needed: you can delete those nodes from the Blueprint, along with the pistol placed in it.
Pieces and Made Of
In the Anims tab, the Weapon row offers two modes:
- Pieces: sets up one weapon.
- Made Of: builds a weapon out of two others, for example one in each hand.
Take a sword and a shield: the Sword row only brings out the sword, the Shield row only the shield. A Sword Shield row in Made Of mode, with Sword for the first hand and Shield for the second, brings out both.
Setting up the pistol from the Data Asset
The pistol from the previous tutorial is set up in Pieces mode:
- 1Hand Socket: the socket of the hand holding the weapon. In the character’s skeleton, here it’s Weapon Socket; copy its name and paste it into the Data Asset.
- 2Holster Socket: where the character stows the weapon, here Holstered Socket.
- 3Add a variant with the pistol’s Static Mesh, then save.
In-game test
In game, the pistol is there and everything works as before. The only difference: nothing left to set up in the Blueprint, everything is done from the Data Asset. Picking up weapons will be covered in an upcoming video.
As always, nothing is mandatory: only enable what you need.