I want to know at least a basic way of creating an inventory system. I know how to save data and such but im unsure on how to make it so that entities can be picked up then used in a menu.
Use SQLite then loop through all of the data and add it to a menu.
I have made an inventory system, and assuming you have a loading / saving system done, this is what you need to do : ( i will do it quick and dirty untill i can edit )
- Make a function that knows what entity you are referencing when reading your save,
- Make a function that inserts a reference into the entity list ( used by the function above )
- Make a function that knows what to do when something happens to an entity ( I used a hook system, then used the referencing table where certain OnLoad and OnUnload functions are stored )
- Make a function that gives you those entitys, and save it
Then, When you make your entity, Insert it into the referencing table, with all the needed functions.
When a player joins / leaves you need to load / save entitys so when reading your SQL , get all the referenced entitys, give them, and enjoy.
If you need some code, PM and I will try and get you some cool shit