tipforeveryone Posted October 5, 2018 Posted October 5, 2018 I want to create a game in which I can choose Weapons and add them into player's inventory in a sperated map (call "loadout.map") That loadout can be saved (player can name the saved one as "recon kit", "assault kit" etc..) or select as active loadout. When a mission map is loaded, player will load saved loadout to play Which is the best way to achieve this ? please give me a direction, and yes, C++ way. The main question is about save and load process, should I use database ? Quote
SpiderPig Posted October 5, 2018 Posted October 5, 2018 I'd use a class to store the information; class LoadOut { private: string saveTitle = "Assault Pack"; vector<(type)> weaponsList; public: }; This will work for saving between map loads. If you want to save between games you can use the Leadwerks FileSystem to save the list to a file. Is your players inventory in LUA though? Quote
tipforeveryone Posted October 6, 2018 Author Posted October 6, 2018 I will create my inventory in C++ instead. Using class to save information is a great idea, thanks but I think saving that list to file is better for me. ! 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.