-
Notifications
You must be signed in to change notification settings - Fork 4
Setting up item usages
Item usages are set up in the item core, and accessed in the inventory menu during game. So open the item core blueprint of an item, and you'll see a property named "Item Usages". It's an FString array, and by default it has "Drop" and "Destroy". When an item is selected in the inventory menu, a series of buttons will be displayed, each named after a distinct item usage.
The important thing is that an item usage needs to be handled. Recall that a character has to implement the IFMGInvSysInventoryOwner
interface. That interface requires an ApplyItemUsage
method. So let's take a look at AFMGInvSysCharacter::ApplyItemUsage
for some reference, and you'll see an if-statement handling different item usages with different methods. Selecting an item in the inventory menu, and clicking an item usage button, will end up with a call to one of those handler methods. If you are using your own character, item usage handling should be similar.