I am trying to implement a system where a player’s inventory is only reset when they leave the session in Fortnite UEFN, but not during gameplay. Specifically, I want weapons, coins, and other resources to be reset (so empty inventory upon map entry) only when the player leaves the map or session. During gameplay, if a player dies, the inventory should not be reset, but should remain intact (so weapons and coins should remain). Currently, the autosave and autoload data system causes data to persist between sessions, but that is not what I want.
What I have tried so far:
- I have explored using the Save Point device with autosave and autoload, but this causes data to persist between sessions.
- I have attempted to use the clear data when a player leaves the session feature, but I have not been able to implement it properly to clear the inventory without affecting other player stats.
- I’ve considered using events like PlayerRemovedEvent to trigger the data wipe, but I’m not sure how to integrate it properly.
Question: Is there a way to reset a player’s inventory only when they leave the session, without it being reset during gameplay (e.g. after death)? How can I make it so that the inventory is reset when a player leaves the session, but is kept intact during gameplay?
thanks for the answers