n00dHolster SGK Integration
Open up UE4_Mannequin_Skeleton and add your sockets on the skeleton. You can name these whatever you’d like. If you want a faster way, you could retarget the included skeleton to the SGK skeleton, thereby automatically adding the slots used in the examples.
2. You need to also edit EN00dHolster_Slots to expand on / remove what’s already included. Or just leave it for now if you intend on just using the included slot definitions
3. Open up BP_MasterCharacter and add BPC_N00dHolster to the character’s component list
4. Once done you must map the newly defined sockets to a slot in the HolsterSlots variable found in the component list of the SurivalCharacter (or your child of the master character). These first 4 steps form the foundation of the system.
Overview
5. While we’re in the MasterCharacter, let’s go ahead and add the Intialise function and loop the active slots to set the owner to the InitializeCharacter collapsed node on EventPossess (might also be OnBeginPlay depending on your version). You may copy paste the INTEGRATE ME part from the example character also, if that’s easier for you, and just connect up the execution thread.
Close-up 1
Close-up 2
6. Then go to the Class Settings in the MasterCharacter and add BPI_N00dHolster
7. In the interface panel of MyBlueprint (still in MasterCharacter), open the GetHolsterComponent function and reference the holster component found in the components list
8. Open up BP_MasterHoldable and add BPI_N00dHolster under the Class Settings. Make sure to compile here so that the things we need will appear in the BP
9. Add the HolsterData variable (FN00dHolster_Data) to BP_MasterHoldable and move it under the Holdable Settings category so we can find it easier in each instance
10. Add the HolsterData variable to the GetHolsterData interface function in BP_MasterHoldable
11. OnConstruct, get the item, break the struct, and get its index – and set it in the HolsterData variable in BP_MasterHoldable (drag off HolsterData and SetMembers, click on the set members node and tick Index on in the Details Panel)
12. Add the SetHolsterData event to BP_MasterHoldable and Set the recently added HolsterData variable
13. Visit all your holdable instances and define your HolsterData. Getting offsets with this system is easy and is documented HERE. A video guide has also been done by Redbackdanno (discord member) and can be found in the Discord server.
14. The Index is ignored here because we are setting it on construct – this allows us to handle behaviour in the system. Fill out the HolsterData in each of your Holdable instances. You need to fill out the Slot, Mesh, and Offsets (if any)
15. Open BP_MasterItem
16. Add BPI_N00dHolster to the Class Settings
17. Add FN00dHolster_Data variable type to BP_MasterItem and call it ItemHolsterData. Drag it under the Item Settings category. Make sure you click the eye to make it Instance Editable
Click the eye for instance editable
18. Open up the interface function and reference the holster data variable you just created
19. In each of the World Item Instances (BP_M4A4_WI, for example), define only the class of BP_MasterHoldable this world item represents (i.e. BP_M4A4). That is all you need here.
20. Open the PlayerInventoryComponent
21. Add the highlighted nodes to the Unequip Animation collapsed node in the PlayerInventoryComponent
22. Add SetDelayFromMontage, followed by the Holster function (highlighted nodes) to the Swap Held Item collapsed node in the PlayerInventoryComponent
23. Get the Item Hit, get the class and Class Defaults, find HolsterData, and call ConstructHolsterFromClass (node released in v1.04) from the Master Character in Add Item > Set New Inventory Item collapsed nodes
24. Add UnholsterByClass to the Drop Item logic (node released in v1.03 – refer to Discord #patch-notes for temporary solution)
25. Add Unholster to the Spawn Held Actor collapsed graph
26. Go to the Add Pickup Item collapsed node and get the Item Hit, pull of the pin and get the GetHolsterData (message), break the HolsterData, get the class, and HosterByClass on the master character holster component
And we’re off!