Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

How can I keep the inventory system intact after switching to another room? I have already checked the Persistence = true box in obj_control. However, after being transferred to the new room, the hotbar doesn't show up. I have to press the 'I' key to open the inventory and then close it before it appears.

Go to the code that starts the Hotbar and add the Persistent to the Hotbar object, do this with the slots as well.

Something like
this: Var inst = instance_creat...... inst.persistence = true;

(+1)

Thank you so much for the detailed explanation! I tried adding the inst.persistence = true as you suggested, and it resolved my issue. The hotbar now stays intact when switching rooms without any problems. I really appreciate your help