tipforeveryone Posted October 5, 2018 Share 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 Link to comment Share on other sites More sharing options...
SpiderPig Posted October 5, 2018 Share 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 Link to comment Share on other sites More sharing options...
tipforeveryone Posted October 6, 2018 Author Share 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 Link to comment Share on other sites More sharing options...
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.