This object is in archive! 

[MODAPI] Add event to IMyPlayer to invoke when consume a item

ogrimdooh shared this feedback 2 years ago
Not Enough Votes

I'm developing a mod, and I miss an event to be called when a player consumes an item, in the IMyPlayer class containing the definition of the consumable used.

This will allow a lot of iterations with the player with consumables.

Replies (1)

photo
1

I managed to find a way to do it.

If anyone else has this problem, here's how I solved it.

Inventory = player.Character?.GetInventory() as MyInventoryBase;

Inventory.ContentsRemoved += Inventory_ContentsRemoved;

Leave a Comment
 
Attach a file