In my script, I create a new storage and send it to the player:
UnturnedPlayer player = (UnturnedPlayer)caller;
var inventory = new Items(7);
inventory.resize(10, 15);
player.Player.inventory.updateItems(7, inventory);
player.Player.inventory.sendStorage();
Then in the main script, I connect to the gesture change signal:
And then when the signal is triggered with the condition gesture == PlayerGesture.InventoryClose. I'm calling the logic for my Storage when I close it:
The problem is that the inventory closing signal is triggered only if there is nothing in your hands. How else can I check if the player has closed the inventory and (if possible) the created storage.
UnturnedPlayerEvents.OnPlayerUpdateGesture += OnPlayerUpdateGesture;
The problem is that the inventory closing signal is triggered only if there is nothing in your hands. How else can I check if the player has closed the inventory and (if possible) the created storage.