In this tutorial we will make a molotov grenade and use the inventory to switch between normal grenade and the molotov one.
CHARACTER
1. Locate the Throw Grenade secion
2. Promote the class that gets spawned to a Variable (call it GrenadeToSpawn or something along those lines)
3. Connect it to both spawns and double check all settings (should be fine tho)
CREATING THE MOLOTOV
4. Duplicate the existing grenade (BP_GrenadeBase)
5. Open it and make the BP and settings look like this:
INVENTORY WIDGET
6. Add 2 new buttons (to the canvas and then drag them anywhere on the widget)
7. In the BP when the buttons are pressed, simply tell it to set the GrenadeToSpawn variable on the character, that will change it from normal to molotov.
That’s it!
The inventory widget can now switch the grenade to use either explosives or a molotov.
You can download the molotov blueprint here if you need to double check it.