How do I save and load when AI's behavior tree changes?

Hi, there. I have an AI with several behavior trees. The player should use some currency so the AI can use the next behavior tree. How can I save the game each time the AI starts using the next behavior tree then load the game exactly after the AI started to use the latest behavior tree?

You need to use the save game.

Put a variable in the save game which is of type ‘behavior tree object reference’. When the AI controller starts, it looks in the save game to see which BT it needs to load: